Announcement

Collapse
No announcement yet.

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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    54 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    29 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    40 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    56 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    47 views
    0 likes
    Last Post CarlTrading  
    Working...
    X