Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Series values from indicator as 0 in a Strategy.
Collapse
X
-
Series values from indicator as 0 in a Strategy.
I have an indicator and a strategy that I am writing to call this indicator and use the values from the indicator. The indicator works as expected and plots on the chart etc. When this indicator is called inside a strategy, I was trying to print the indicator plot/series, but it prints correct values in Historial and always prints 0 in real-time. Not sure what is wrong. Unfortunately I can not export or upload the code.
Tags: None
-
I have an indicator and a strategy that I am writing to call this indicator and use the values from it. The indicator works as expected and plots on the chart, etc. When this indicator is called inside a strategy, I was trying to print the indicator plot/series, but it prints correct values in historial and always prints 0 in real time. I'm not sure what is wrong. Unfortunately, I can not export or upload the code.
-
Hello naanku,
Add debugging prints to understand the behavior. Below is a link to a support article on adding debugging prints to understand behavior.
Print the time of the bar, the state property. If the plot series is assigned in a logic block, print all values compared in the condition with labels for each value and comparison operator.
One line below where the plot series is assigned a value, print the time of the bar and the assigned value.
To assist, I've made a very simple test script that calls an indicator in both historical and real-time and shows the plot value is being assigned (to the bar number) in the indicator in rea-time.
TestPlotValueStrategy_NT8.zipChelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
45 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
21 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
31 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment