• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator using GetCurrentAsk

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

    Indicator using GetCurrentAsk

    hi

    one of my indicator uses GetCurrentAsk(2) and GetCurrentAsk(1) to plot values on a chart. I've noticed that for historical values (any value that is not present.. including a second prior to adding the indicator onthe chart) the values that are actually being plotted are historical Closes rather than GetCurrentAsk. But once i've added the indicator, it starts plotting Ask values from that point forward. But If i refresh the chart, it plots closes again. Any idea why this happens and what I can do to get historical getcurrentask data? Is it because I don't have getcurrentask data saved in my data aggregator?

    #2
    Originally posted by calhawk01 View Post
    hi

    one of my indicator uses GetCurrentAsk(2) and GetCurrentAsk(1) to plot values on a chart. I've noticed that for historical values (any value that is not present.. including a second prior to adding the indicator onthe chart) the values that are actually being plotted are historical Closes rather than GetCurrentAsk. But once i've added the indicator, it starts plotting Ask values from that point forward. But If i refresh the chart, it plots closes again. Any idea why this happens and what I can do to get historical getcurrentask data? Is it because I don't have getcurrentask data saved in my data aggregator?
    That's what this method will substitute with historical data
    Ref: http://www.ninjatrader.com/support/h...currentask.htm

    Comment


      #3
      Hello,

      Calonious is correct. When you pass a bar index into GetCurrentAsk(), it will return the close price of the referenced bar. There are a few ways that you can get around this. If you are only working with your strategy in real-time, you could add a secondary data series that uses Ask prices, then use that data series for your indicator calculations.

      If you would like to backtest the strategy, then you will only have historical close data to work with. In this case, you could create a custom data series that would store ask prices in real-time, which you could then reference later for your calculations.

      Please let me know if I can assist further.
      Dave I.NinjaTrader Product Management

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ballboy11, Today, 09:35 AM
      0 responses
      1 view
      0 likes
      Last Post ballboy11  
      Started by Conall, Today, 06:11 AM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by CaptainAmericaXX, Today, 07:41 AM
      3 responses
      8 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by Longhornmark, Today, 07:06 AM
      3 responses
      13 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by 2sureshk, Today, 07:29 AM
      0 responses
      6 views
      0 likes
      Last Post 2sureshk  
      Working...
      X