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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X