Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Ninjascript syntax for n bars down
Collapse
X
-
Ninjascript syntax for n bars down
The indicator method NBarsDown() returns a 0 or 1, yet the data return type is a double.. it should be a boolean, or at worst an int. To use it in a conditional check, you need to parse it, which is somewhat clumsy and confusing.. thanks.Tags: None
-
Hello CSharpTrader,
Thanks for your note.
Unfortunately plots returns a double value only and as such it is expected.
You can custom code it further and expose a intseries or a boolseries. Please refer to this sample code which demonstrates how to expose a data series which is not a plot
JoydeepNinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
227 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
146 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
160 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
237 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
197 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment