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?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Indicator using GetCurrentAsk
Collapse
X
-
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?Tags: None
-
That's what this method will substitute with historical dataOriginally posted by calhawk01 View Posthi
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?
Ref: http://www.ninjatrader.com/support/h...currentask.htm
-
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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
557 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment