Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

need advice on strat building please help

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

    need advice on strat building please help

    Hi,
    I have an indicator that runs well on a X minute chart for a breadth instrument (TRIN) data stream.
    My challenge is that I am trying to build a strategy for a different instrument on an exotic bar type (ninzarenko) and pull in or use the value from the indicators last posted X minute bar, and not sure how to do it because of course the chart times dont align at all, and even the instruments are different.

    I am thinking perhaps I can customize the indicator to output its value every closed bar to a file, and in my strat have a named variable, and every closed (ninzarenko) bar pull the indicator-outputted value from that file for the strat into that named variable to then use in its conditionals (if variable X then Y etc).

    Does this sound like a logical way to achieve what I am attempting given that I am attempting to integrate data from an altogether different (instrument and chart type's indicator value) into a strat? Or is there a more elegant way to code this within only the strat itself (still running the indicator on its X minute chart)?

    I have attached the indicator in case that helps

    Thank you!
    Attached Files
    Last edited by wrines; 12-07-2021, 07:35 PM.

    #2
    Hello wrines,

    Thank you for your post.

    I would suggest adding an additional X minute data series to the strategy and use that to calculate the indicator, then you can access the most recently updated values while the primary series is processing (BarsInProgress == 0).

    I'd first take a look at our help guide page on considerations for multi-time frame and instrument scripts:



    I would then suggest looking at the built in Sample Multi Instrument and Sample Multi Time Frame strategies that you can find in the NinjaScript Editor to get an idea of how this would be structured.

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

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