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

Using Tick Replay

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

    Using Tick Replay

    Hey.
    I use the indicator for calculations traded on bid / ask.
    In the indicator there is a method
    Code:
     protected override void OnMarketData(MarketDataEventArgs e)
            {
                if (e.MarketDataType != MarketDataType.Last)
                    return;
                    if (e.Price > e.Ask)
                    {
                        Ask[0] += vol;
                    }
                    if (e.Price < e.Bid)
                    {
                        Bid[0] += revers ? vol : -1 * vol;
                    }
                }
    As a result of which I get the indicator on the graph.
    How do I use the data of this indicator in the strategy?
    Can there be an example of such an implementation?

    Thanks in advance.

    I ask you to post the post to the strategy branch nt8
    Attached Files
    Last edited by Arkadiy_B; 07-21-2017, 05:03 AM.

    #2
    Hello Arkadiy_B,

    You could set those series equal to a plot, which would make them available to be referenced by a strategy. I would suggest looking at the code of the SMA indicator for an example of how to save calculations to a plot, which then allow it to be referenced from a strategy.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by dward123, 01-02-2024, 09:59 PM
    4 responses
    174 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Started by ETFVoyageur, Today, 04:00 PM
    2 responses
    19 views
    0 likes
    Last Post ETFVoyageur  
    Started by AaronKTradingForum, Today, 03:44 PM
    1 response
    8 views
    0 likes
    Last Post AaronKTradingForum  
    Started by Felix Reichert, 04-26-2024, 02:12 PM
    11 responses
    80 views
    0 likes
    Last Post Felix Reichert  
    Started by junkone, 04-28-2024, 02:19 PM
    7 responses
    83 views
    1 like
    Last Post junkone
    by junkone
     
    Working...
    X