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 gemify, 11-11-2022, 11:52 AM
    6 responses
    803 views
    2 likes
    Last Post ultls
    by ultls
     
    Started by ScottWalsh, Today, 04:52 PM
    0 responses
    3 views
    0 likes
    Last Post ScottWalsh  
    Started by ScottWalsh, Today, 04:29 PM
    0 responses
    7 views
    0 likes
    Last Post ScottWalsh  
    Started by rtwave, 04-12-2024, 09:30 AM
    2 responses
    22 views
    0 likes
    Last Post rtwave
    by rtwave
     
    Started by tsantospinto, 04-12-2024, 07:04 PM
    5 responses
    70 views
    0 likes
    Last Post tsantospinto  
    Working...
    X