firemyst's avatar


Member since: 26 Mar 2019





Last Algorithm Comments

@QQE:  16 Dec 2022, 07:31

Stupid me. I understand what you're doing with the _atrRsi now. My bad on that one. I still don't understand why you have a "CreateDataSeries()" on a line by itself.

@QQE:  15 Dec 2022, 14:44

_atrRsi is never used. Why is it declared? In the "Calculate" method it is assigned to, but it has no output, and affects no other calculations. Also, you have another bug - just a line "CreateDataSeries()" that does nothing in the "Initiate" method.  

@[Bullitt] Half Trend:  27 Nov 2022, 05:52

Is this code based on the Trading View version of this indicator?  

@Renko Wicks:  05 Oct 2022, 05:22

Thanks for posting this! This is a great start until @Spotware includes wicks on their Renko charts. Given the good start, some parts of the code are very inefficient, so I've modified some of it, posted below with the explanations for the reasons for the change. Hopefully you'll take these into consideration and post an updated version of your indicator. ///////=========== suggested changes below ================ //Moved the method parameters around. Primitive types should go first because they're more likely to be placed //in a CPU register for significantly faster access. We are also using it a lot more in the revised code. //Also added in the Bars parameter at the end to have the "reference" to the object in the "stack" rather than the "heap" - significantly faster portion of memory. //The call to GetWicks() will have to be updated elsewhere in the code so the parameters match.         private double GetWicks(bool isBullish, DateTime startTime, DateTime endTime, Bars TicksOHLC)         {             double min = Int32.MaxValue;             double max = 0;          //cache the "count" locally so it's not evaluated in each for-loop iteration!             int ticksCount = TicksOHLC.Count;         //This isn't needed             //List<double> PriceWicks = new List<double>();         //Note we replaced TicksOHLC.Count with the cached value so "TicksOHLC.Count"         //doesn't have to be evaluated through every loop iteration.             for (int tickIndex = 0; tickIndex < ticksCount; tickIndex++)             {                 //var tickBar = TicksOHLC[tickIndex];         //This outer if statement is redundant and not needed.                 //if (tickBar.OpenTime < startTime || tickBar.OpenTime > endTime)                 //{                 if (TicksOHLC[tickIndex].OpenTime > endTime)                     break;                 else if (TicksOHLC[tickIndex].OpenTime < startTime)                     continue;                 //}         //There's no need for this list object         //With the "isBullish" flag, we're either sending back a "min" or "max" value,         //so that's all we need to check for in the loop.                 //PriceWicks.Add(TicksOHLC[tickIndex].Close);                 if (isBullish && TicksOHLC[tickIndex].Close < min)                     min = TicksOHLC[tickIndex].Close;                                 else if (!isBullish && TicksOHLC[tickIndex].Close > max)                     max = TicksOHLC[tickIndex].Close;                              }         //This isn't needed             //if (PriceWicks.Count == 0)             //    return double.NaN;                      //No need to get both the Max and Min since we're only sending one or the other back depending         //on the isBullish flag. So why waste CPU time and resources?             //min = PriceWicks.Min();             //max = PriceWicks.Max();             if (isBullish)                 return min;             else                 return max;         }    

@Renko on Time/Tick/Range Chart:  11 Aug 2022, 16:30

@fernando.f.oficial, you're not seeing anything because when this indicator calls the "DrawRenkoBrick" Method, the LowPrice and HighPrice parameters are coming in as NaN's. The Chart.DrawRectangle method can't draw coordinates that are NaN's.  The author @jumpycalm needs to fix this bug.  

@RealPivot:  24 Jun 2022, 05:21

This is a great indicator. However, it would be a lot more efficient and less resource intensive if the code was updated to only calculate the pivot points when the "index" for the pivot time frame that's selected changes. For example, if I'm on the 4-hour time frame, and have the daily pivot point selected, why does it have to be calculated on every tick? It's not going to change until the next day. I would suggest implementing logic where you have a global class variable called something like "int previousIndex", and when the current pivot timeframe index is > previousIndex in the Calculate method: 1) run the calculations 2) set previousIndex to the current pivot time frame index. 3) until current pivot time frame index is > previousIndex, you can skip all the logic in Calculate. Boom! You just saved all the CPU calculations having to be done every tick and your indicator just became that much faster. :-)

@Currency Strength Meter (Pro) Ver1.11:  07 May 2022, 13:57

should have been "stackoverflow41" and not "stackover41"

@Currency Strength Meter (Pro) Ver1.11:  07 May 2022, 13:56

Still doesn't work. I can't post a screen capture or video here. It might be working for you, but it's definitely not on Pepperstone cTrader here. My email: "stackover41" @ "". Send me a message please (hopefully with a screen capture of your suggested configs) and I can respond back with a video and screen captures showing you the issues.

@Currency Strength Meter (Pro) Ver1.11:  07 May 2022, 13:37

THis indicator doesn't seem to work. I've had to comment out this line:   private void Chart_ScrollChanged(ChartScrollEventArgs obj)         {             //Chart.SetYRange(MVRange, PVRange);         } Because cTrader keeps flashing lines up and down -- the ScrollChanged event is constantly called even though I don't touch it. Labels are never shown as a result.

@Super Profit:  24 Jan 2020, 21:22

Can you describe in plain English please what you're doing with the MA's in your code? I don't understand the reasoning, or what you're doing with these:   var period1 = (int)Math.Floor(DllPeriod / Period);             var period2 = (int)Math.Floor(Math.Sqrt(DllPeriod));             _movingAverage1 = Indicators.MovingAverage(Price, period1, MaType);             _movingAverage2 = Indicators.MovingAverage(Price, DllPeriod, MaType);             _movingAverage3 = Indicators.MovingAverage(_dataSeries, period2, MaType);   What the Sqrt function? And the DLLPeriod/Period. I don't understand what they're doing or purpose is? Thank you.

Last Forum Posts

@What's New in cTrader Desktop 4.6:  25 Jan 2023, 17:58

Awesome new features! About time we got the color parameter and Exception handling method!

Now all we need is an update to Renko charts with an option to show the "tails" and not just the open/close prices of each bar.

Thanks @Spotware!

@How to apply multiple currencies by one cBot?:  25 Jan 2023, 08:15

You haven't updated the code in all the required places, and are still using Symbol.Ask in places you shouldn't be.


@How to apply multiple currencies by one cBot?:  25 Jan 2023, 07:47

How about posting your updated code?

@Refresh bar just before new bar start:  25 Jan 2023, 06:21

Probably not, because there's no way to know when a new bar is going to start. A new bar forms on the first tick after the previous bar closes. It could take half a second, or 10 seconds (depending on the time of day and symbol) on when that next tick will come in to cause a new bar to open up.

@How to apply multiple currencies by one cBot?:  25 Jan 2023, 06:18

jennifer1978bgf said:

How to apply multiple currencies by one cBot?

I have tried the code below, even different currencies get opened, the price is not correct.

Can someone help?

        [Parameter("Vol", DefaultValue = 10000)]
        public int Vol { get; set; }

        protected override void OnStart()
            Symbol symbol_1 = MarketData.GetSymbol("USDJPY");
            Symbol symbol_2 = MarketData.GetSymbol("EURUSD");
            Symbol symbol_3 = MarketData.GetSymbol("GBPUSD");

            var result =

            PlaceLimitOrder(TradeType.Buy, symbol_1, Vol, Symbol.Ask - 15 * Symbol.PipSize, "BU", 30, 15);
            PlaceLimitOrder(TradeType.Buy, symbol_2, Vol, Symbol.Ask - 15 * Symbol.PipSize, "BE", 30, 15);           
            PlaceLimitOrder(TradeType.Buy, symbol_3, Vol, Symbol.Ask - 15 * Symbol.PipSize, "BG", 30, 15);           

            if (!result.IsSuccessful) Print("Error: ", result.Error);

one of your issues is for each of those, you're using the chart's current symbol to get the ask and pipsize, not the currency you want.

Symbol.Ask gets the charts current symbol's asking price.

If you want the asking price of USDJPY for example, with your code you have to use symbol_1.Ask and symbol_1.PipSize

@Optimization of cbot:  25 Jan 2023, 06:16

You should post this under "Suggestions" where Spotware will read it.

@Unable to change the name of cBot or Indicator:  25 Jan 2023, 06:14

What provider and version of cTrader are you using?

And just to be sure, you've been trying to change your indicator names in the left panel when you click on "automate"?

@Gann Wave help:  25 Jan 2023, 06:11

How doesn't it work? What's the problem?

@indicator with % changes:  25 Jan 2023, 06:10

You seriously need to be more specific in what you are asking for.

% changes with what?

% Difference in an indicator value?

% Difference in current close price vs last close price?

% difference in current price vs yesterday's market close price?

% difference in bar's open value vs the last bar's open value?

Something else?

@Position only PARTIALLY CLOSED when Take Profit line is hit!:  19 Jan 2023, 02:14

Hello SpotWare:

I encountered an issue using cTrader 4.5.6 on Renko20 charts where the "Take Profit" line was hit, but cTrader did not close the entire position!

All times are in UTC + 8 for NAS Re20. Here's the log I have in cTrader. Pepperstone is the broker:

18/01/2023 21:30:03.678 | Modifying position PID109212340 (TradeType: Buy, Volume: 1.1)
18/01/2023 21:30:04.162 | → Modifying position PID109212340 (TradeType: Buy, Volume: 1.1) SUCCEEDED, Position PID109212340
18/01/2023 21:30:04.162 | Closing event fired for NAS100.
18/01/2023 21:30:04.365 | Position "109212340" closed for reason "TakeProfit" with $46.65 profit. Entry Price 11602.4, Closing Price 11635.3, StopLoss 11605.4
18/01/2023 21:30:04.365 | Position #1: 32.8999999999996 pips. Entry price 11602.4, Closing price 11635.3, Price Difference 32.8999999999996
18/01/2023 21:30:04.365 | Position #2: -5.10000000000036 pips. Entry price 11640.4, Closing price 11635.3, Price Difference -5.10000000000036

It appears there's an issue with cTrader when two events happen at the exact same time. In this case, the position size was increased and confirmed as "SUCCEEDED" when the take profit line was hit and the position was closed. As a result, only PART of the position was closed, not all of it!

Screen capture below detailing all the information:

Thank you.

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.

No uploaded.

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.

No uploaded.