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

Add indicator to other indicator in NT8

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

    #31
    Hi Jim,

    Thanks a lot for the great value explanation and the video!
    That helped clarifying how to formulate the problems.

    Ok, Think I understand now.

    On Mondays, Time[0] returns the values gotten from the last 'Calculation made at the most recent close timestamp'
    — which was most recent Sunday's Close (for CL, GC etc. with-Sunday-evening-session-but-no-Saturday's-sessions-contracts,
    for other contracts (without-Sunday-evening-session-nor-Saturday's-sessions-contracts: Lumber, Live Cattle etc.)
    Time[0] returns values gotten from most recent Friday's close)?
    On Mondays, Time[1] returns the values gotten from the last 'Calculation made at the most recent close timestamp - 1'
    — which was most recent Friday's Close (for CL, GC etc. with-Sunday-evening-session-but-no-Saturday's-sessions-contracts,
    for other contracts (without-Sunday-evening-session-nor-Saturday's-sessions-contracts: Lumber, Live Cattle etc.)
    Time[1] returns values gotten from most recent Thursday's close)?

    Whereas

    On Sundays, Time[0]returns the values gotten from the last 'Calculation made at the most recent close timestamp'
    — which was most recent Friday's Close (for CL, GC etc. with-Sunday-evening-session-but-no-Saturday's-sessions-contracts,
    for other contracts (without-Sunday-evening-session-nor-Saturday's-sessions-contracts: Lumber, Live Cattle etc.)
    Time[0] returns values gotten from most recent Friday's close as well)?
    On Sundays, Time[1] returns the values gotten from the last 'Calculation made at the most recent close timestamp -1'
    — which was most recent Thursday's Close (for CL, GC etc. with-Sunday-evening-session-but-no-Saturday's-sessions-contracts,
    for other contracts (without-Sunday-evening-session-nor-Saturday's-sessions-contracts: Lumber, Live Cattle etc.)
    Time[1] returns values gotten from most recent Thursday's close as well)?


    For with-Sunday-evening-session-but-no-Saturday's-sessions-contracts, we can use:

    Time[0] on Sundays

    Time[1] on Mondays


    For without-Sunday-evening-session-nor-Saturday's-sessions-contracts, we can use:

    Time[0] on Mondays or/and Sundays

    Time[1] on Mondays


    The causation/why reasoning I made:

    The Time[0] can only refer to one bar back on the Daily bars/data series with Calculate mode set to OnBarClose,
    it cannot refer to current/processing bar (simply because the data is not yet available?).
    It's just that way because of the OnBarClose calculations for the Daily bar — it must get some values,
    and the only ones available/the most recent ones are the ones from the most recent Bar (not the not yet available ones of the current bar).

    I think that makes sense. I was just too used to viewing indexes zero [0] to only be applicable to the processing bar. But that's not possible with OnBarClose calculation mode and the spaced Closes between Fridays sessions and Sundays evening session circumstance.

    Thank a lot! You rock!

    I'll test it now and then will tackle the BarsPeriod approach to get familiar with that way too.

    Be well!

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AttiM, 02-14-2024, 05:20 PM
    12 responses
    213 views
    0 likes
    Last Post DrakeiJosh  
    Started by cre8able, 02-11-2023, 05:43 PM
    3 responses
    237 views
    0 likes
    Last Post rhubear
    by rhubear
     
    Started by frslvr, 04-11-2024, 07:26 AM
    8 responses
    116 views
    1 like
    Last Post NinjaTrader_BrandonH  
    Started by stafe, 04-15-2024, 08:34 PM
    10 responses
    47 views
    0 likes
    Last Post stafe
    by stafe
     
    Started by rocketman7, Today, 09:41 AM
    3 responses
    12 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X