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 kevinenergy, Yesterday, 12:01 PM
    4 responses
    14 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by DawnTreader, 05-08-2024, 05:58 PM
    7 responses
    27 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by sgordet, Today, 05:24 AM
    0 responses
    9 views
    0 likes
    Last Post sgordet
    by sgordet
     
    Started by haas88, 03-21-2024, 02:22 AM
    18 responses
    211 views
    0 likes
    Last Post haas88
    by haas88
     
    Started by Board game geek, Today, 02:20 AM
    0 responses
    12 views
    0 likes
    Last Post Board game geek  
    Working...
    X