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
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!
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
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
-
Originally 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 hazylizard, Today, 08:38 AM
|
2 responses
8 views
0 likes
|
Last Post
by hazylizard
Today, 09:02 AM
|
||
Started by geddyisodin, Today, 05:20 AM
|
2 responses
18 views
0 likes
|
Last Post
by geddyisodin
Today, 08:44 AM
|
||
Started by Max238, Today, 01:28 AM
|
5 responses
47 views
0 likes
|
Last Post
by Max238
Today, 08:30 AM
|
||
Started by giulyko00, Yesterday, 12:03 PM
|
3 responses
13 views
0 likes
|
Last Post Today, 08:26 AM | ||
Started by habeebft, Today, 07:27 AM
|
1 response
16 views
0 likes
|
Last Post Today, 08:08 AM |
Comment