Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Compare open on multi time frame

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

    Compare open on multi time frame

    Hello, I am newbie in developing strategy in ninjatrader. I was looking for solution, but i can not find it. I just want to enter long position if the price is greater then open of curent bar about 2 ticks. I found out that I have to use multi time frame. Compare 1 second bars and 1 minute bars. I want to trade on 1 minute chart. I need to compare each minute if the open of 1 second bar is greater then open on 1 minute bar. How can I do it? And how can I use it every minute? Thank you

    #2
    Hello,

    Thank yo for the question.

    If you want to compare the Open of a primary series against a secondary series, you could use Opens http://ninjatrader.com/support/helpG...lightsub=opens

    Code:
    if(BarsInProgress == 0) // if the primary is 1 minute, this is executed ever 1 minute or with COBC
    {
        if(CurrentBars[0] < 1 || CurrentBars[1] < 1) return;
        if(Opens[0][0] > Opens[1][0]) 
        {
            EnterLong();
        }
    }
    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    263 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    168 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    170 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    257 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    209 views
    0 likes
    Last Post CarlTrading  
    Working...
    X