I am logging on from UK, cannot seem to get the correct price that matches the displayed default FDAX price using GetCurrentAsk(); / GetCurrentBid();, also, which session time should I be using as different session times give me different current prices ?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Wrong current price Stamp
Collapse
X
-
Wrong current price Stamp
Hello
I am logging on from UK, cannot seem to get the correct price that matches the displayed default FDAX price using GetCurrentAsk(); / GetCurrentBid();, also, which session time should I be using as different session times give me different current prices ?Tags: None
-
Hello ms4551,
Welcome to the NinjaTrader forums!
Are you using these methods in a script? How are they used exactly and what exactly are you comparing against?
You can see how different session templates are defined by clicking tools > Session Manager. You can also create your own session template if the preinstalled ones don't fit what you're looking for. You can review the times traded for FDAX by visiting the exchange website.
Ryan M.NinjaTrader Customer Service
-
Yes the methods are being called in a script, also the reason why I mentioned different prices is because each time I change the session time and the run the script the recorded current price changes and it is the same price for both Bid and Ask as if the method is calling the index price instead of the futures price or the last traded price of that session.
Comment
-
When you call these methods historically, it will use the close value and won't be able to capture the current bid / ask data.
To help you troubleshoot this we need to know exactly how you're using these methods (share the file or code snippet), what values you expect to get, and what you're getting instead.Ryan M.NinjaTrader Customer Service
Comment
-
Your sample code assigns the value of these variables only during OnStartUp(), which is called only once. If you want them more current, you can access from OnBarUpdate. If you need to monitor for every change in level I bid / ask, then you can access prices from OnMarketData()
protected override void OnStartUp()
{
//***********************
Sprice = GetCurrentBid();
Bprice = GetCurrentAsk();Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ETFVoyageur, Today, 02:08 AM
|
0 responses
5 views
0 likes
|
Last Post
by ETFVoyageur
Today, 02:08 AM
|
||
Started by kujista, 04-22-2024, 07:46 AM
|
3 responses
12 views
0 likes
|
Last Post
by kujista
Today, 02:06 AM
|
||
Started by kujista, 04-23-2024, 06:23 AM
|
7 responses
57 views
0 likes
|
Last Post
by kujista
Today, 02:03 AM
|
||
Started by SentientDavid, Today, 01:34 AM
|
0 responses
7 views
0 likes
|
Last Post Today, 01:34 AM | ||
Started by MrForgetful, Today, 01:28 AM
|
0 responses
6 views
0 likes
|
Last Post
by MrForgetful
Today, 01:28 AM
|
Comment