Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Help! How to call the current price value
Collapse
X
-
Help! How to call the current price value
Hello, please tell me how I can call the current price value and compare it for example with the opening price?Tags: None
-
Hello Papercut110,
Thank you for your note.
Could you please clarify in more detail what you're looking to do so I can better direct you? If you are looking just to reference the values you could use the Market Analyzer to display them under Control Center>New>Market Analyzer. Or you could use the Strategy Wizard to build a condition/strategy under the Control Center>Tools>New NinjaScript>Strategy.
See Market Analyzer Youtube:
For the Strategy Wizard:
In Strategy Wizard, after pressing next you would want to name the strategy and set CalculateOnBarClose to False, so that Close[0] would equal the last price. Click next next, then under Conditions and Actions, "When the following conditions are true"">Add.
This is where you could compare the Close (Current price) against the Open using the various operators in the middle.
See Strategy Wizard Youtube:
I look forward to you're reply.Alan P.NinjaTrader Customer Service
-
NinjaTrader_AlanP, did I understand you correctly, if I use CalculateOnBarClose = False then "Close[0]" will use the current price, but not the one which closed bar?? I'm sorry, my language is lame
Comment
-
Alan P.NinjaTrader Customer Service
Comment
-
-
GetCurrentAsk and GetCurrentBid
When OnBarClose is True, I can still access GetCurrentAsk() and GetCurrentBid(). It is surprising for me that both these functions are available but something like: GetCurrentPrice() is not! And I have use OnMarketData() just to get the current price! Anyway, thank you for the earlier answer, it certainly helped
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
566 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 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
547 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
548 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment