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 sjsj2732, Yesterday, 04:31 AM
    0 responses
    28 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    284 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    281 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    132 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    90 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X