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

Bars Back

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

    Bars Back

    I am not sure of what number 1 means in this line of the code:

    if Close [0] > Open [0]
    && (CrossAbove(Close,EMA(High,Period),1)

    Here it says: If the close of the current bar is high than the open of the current bar and there is a cross above of the Close of an EMA ¿in the previous bar?

    Thanks

    #2
    Hi dvercher,

    That's a lookback, look back periods start at 1 so work a little differently than bar indexing which starts at 0.

    1 is the bar you're currently evaluating. It essentially means: Within the last x bars, evaluate for crossover.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Max238, Today, 01:28 AM
    1 response
    21 views
    0 likes
    Last Post CactusMan  
    Started by giulyko00, Yesterday, 12:03 PM
    2 responses
    10 views
    0 likes
    Last Post giulyko00  
    Started by r68cervera, Today, 05:29 AM
    0 responses
    4 views
    0 likes
    Last Post r68cervera  
    Started by geddyisodin, Today, 05:20 AM
    0 responses
    6 views
    0 likes
    Last Post geddyisodin  
    Started by JonesJoker, 04-22-2024, 12:23 PM
    6 responses
    37 views
    0 likes
    Last Post JonesJoker  
    Working...
    X