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 CortexZenUSA, Today, 12:53 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by CortexZenUSA, Today, 12:46 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by usazencortex, Today, 12:43 AM
    0 responses
    5 views
    0 likes
    Last Post usazencortex  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    168 responses
    2,266 views
    0 likes
    Last Post sidlercom80  
    Started by Barry Milan, Yesterday, 10:35 PM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X