Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cant simulate multitimeframe renko

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cant simulate multitimeframe renko

    Hi,

    I think there is something wrong in my code. I have generated the strategy with wizard and changed AddDataSeries() to AddRenko(). I am trying to have two Renkos where QQE indicator watches the primary and TrendMagic indicator watches TmRenko that is set to 10000 with input variable called TmRenko. I checked with charts and both Renkos are generating multiple bars in the charts alone so it should not be the amount of bars.

    else if (State == State.Configure)
    {
    AddRenko("TMRenko", TmRenko, Data.MarketDataType.Last);
    }
    else if (State == State.DataLoaded)
    {
    amaQQE1 = amaQQE(Close, 14, 5, 14, 2.618, 4.236, 70, 30, amaQQETrendDefinition.Cross);
    AkunTrendMagic1 = AkunTrendMagic(Closes[1], 2, 200, 10);
    amaQQE1.Plots[0].Brush = Brushes.Blue;
    amaQQE1.Plots[1].Brush = Brushes.Red;
    amaQQE1.Plots[2].Brush = Brushes.DarkGoldenrod;
    AddChartIndicator(amaQQE1);
    }
    }

    protected override void OnBarUpdate()
    {
    if (BarsInProgress != 0)
    return;

    if (CurrentBars[0] < 0
    || CurrentBars[1] < 0)
    return;

    #2
    Just realized that my parameter "string instrumentName" is not an named as wanted instrument (or any instrument that matter) and that is most likely the problem. Is there a way use it always as same as primary one or do I need to always change it in code when I want to change pairs. Also read that using variables determing brick size is not recommended.

    Comment


      #3
      Hello Gelotuz,

      With the AddRenko that lacks the overload to take the primary instrument so you would need to hard code it. With AddDataSeries and all of the data adding methods like AddRenko they can fail if variables are being used for the values of the added series or instrument name. It is best to just hard code those items to ensure it works as expected.

      I look forward to being of further assistance.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kinfxhk, 07-14-2026, 09:39 AM
      0 responses
      7 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      59 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      41 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      47 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      38 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X