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

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.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by andrewtrades, Today, 04:57 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    5 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    7 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X