Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Mtf 1440 sma

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

    Mtf 1440 sma

    Hi, I have three questions that I haven't been able to find answers for by searching this forum;

    1. How to code a condition that searches if the 20 period SMA on a 1440m chart is less than the Low of the current bar on the 1440m TF from within a strategy on a shorter TF?
    SMA(BarsArray[1], 20) [0] < Low[0] didn't work on the backtest so I tried;
    SMA(BarsArray[1], 20) [0] < Low(BarsArray[1]) [0] to make sure its looking at the low of bar on the 1440 chart but got an "property used as a method" error on compiling.

    2. If in a strategy added to an instrument with a 1m TF the primary Bars is 1m and the 1440m (BarsArray[1]) is 1440m bars, what happens when the strategy is added to a 3m TF? Does the BarsArray[1] become 4320m (3x 1440) bars or stay at 1440m bars?

    3. How do I plot the 1440m chart with the 20SMA in the strategy analyzer chart window along with the primary chart so I can verify its functioning after a backtest?

    Thanks!

    #2
    Stem1, welcome to our forums -

    1. In MultiSeries context please work with Lows[1][0] then -



    2. No, the added series stays at the interval you specified as you added it.

    3. This is unfortuantely not directly supported, for the regular charts you could emply those techniques here - http://www.ninjatrader-support2.com/...ead.php?t=6651
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thank you, its working now.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Segwin, 05-07-2018, 02:15 PM
      10 responses
      1,767 views
      0 likes
      Last Post Leafcutter  
      Started by Rapine Heihei, 04-23-2024, 07:51 PM
      2 responses
      30 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by Shansen, 08-30-2019, 10:18 PM
      24 responses
      943 views
      0 likes
      Last Post spwizard  
      Started by Max238, Today, 01:28 AM
      0 responses
      9 views
      0 likes
      Last Post Max238
      by Max238
       
      Started by rocketman7, Today, 01:00 AM
      0 responses
      7 views
      0 likes
      Last Post rocketman7  
      Working...
      X