Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple StrategyPlot()

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

    #31
    Originally posted by roonius View Post
    r2kTrader:

    let's say you want some special calculations on each bar, for example
    double myvalue = (close[1] + close[0] + open[0] + high[1])/4;
    And now you want SMA of the last 14 myvalues?
    So you declare dataseries to store those values for each bar:
    MyDataseries.Set (myValue);
    double Myothervalue = SMA(MyDataSeries,14)[0];

    Try to do it without DataSeries, just with BarsArray...

    Roonius,

    Thank you for helping out.

    I am starting to see the light. But to be clear, is it possible (not feasible) to do what you said above with just the BarsArray and your own code? Couldn't you just build a class to do that? (or is that essentially what the DataSeries is, lol??)

    This was helpful:



    Thanks,


    r2kTrader

    Comment


      #32
      Originally posted by r2kTrader View Post
      Roonius,

      Thank you for helping out.

      I am starting to see the light. But to be clear, is it possible (not feasible) to do what you said above with just the BarsArray and your own code? Couldn't you just build a class to do that? (or is that essentially what the DataSeries is, lol??)

      This was helpful:



      Thanks,


      r2kTrader
      I believe you just answered your own question.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      56 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      143 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      276 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X