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 NullPointStrategies, Today, 05:17 AM
      0 responses
      44 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      65 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X