Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need help with multi-time frame

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

    Need help with multi-time frame

    I am testing with NinjaTrader_Josh's ZlagMATS which works with Ehlers ZeroLag MA. I attached it.

    I am not getting the results I expected, and I am guessing that I am not running the indicator on the correct timeframe, because if I change the primary timeframe it changes the results.

    My understanding from the documentation is that if we use the construct

    if (BarsInProgress == 1)
    {
    Close[0]
    }

    Then the [0] in Close[0] is referring only to the timeframe with the 1 index, without using BarsArray[1].

    Is this correct? There is no need to use BarsArray[1], because we are inside this construct?

    if it is then we should be able to do something from ZlagMATS like this:

    if (BarsInProgress == 1)
    {
    if(ToTime(Time[0]) >= 20000 && ToTime(Time[0]) <= 110000)

    Do something....
    }


    And in the above Time[0] would be referring to the timestamp of the timeframe with the 1 index, without using BarsArray[1].

    Is this correct?

    I'll leave it at that for now and ask a follow up depending on what the answer is.

    I've attached the indicator and Strategy.


    Attached Files
    Last edited by Crassius; 03-11-2012, 06:50 PM.

    #2
    Well, after much head scratching I think I have figured this out. Thanks for looking, but I have answered my previous questions.

    Comment


      #3
      Crassius,

      I am happy you have resolved your issue.

      Please let us know if you have any other questions.
      Adam P.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      67 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      36 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      59 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X