Thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Custom DataSeries EMA
Collapse
X
-
Hi eleven,
Are you getting any errors in the Log tab of the Control Center when applying the indicator?
If no, let's start from the top...
1. Can you clarify "not working"? Does it not plot at all? Different than expected? Something else?
2. How are you setting this up? Can you provide a code snippet?TimNinjaTrader Customer Service
-
Tim,
I am getting the following error in the log. It states "Error on setting indicator plot for indicator....Value outside of valid range".
Can you point me in the right direction on this? A snippet of code is below. I cannot plot "var2".
Code:double var1 = (StdDev(Close,Period)[0]-SMA(Close,Period)[0])/StdDev(Close,Period)[0]; Value.Set(var1); double var2 = EMA(Value,Smooth)[0];
Comment
-
It looks like you are going to need an escape statement.
That code snippet should likely be the first statement in your OnBarUpdate() method. That alternative is to make sure that you arrange a calculation routine for when the number of bars is less than the "Period" variable.Code:if (CurrentBar < Period + 1) return;
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
36 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
14 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
19 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
22 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment