Thank you very much
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Indicator is dissapearing
Collapse
X
-
Indicator is dissapearing
Hello. I'm developping a indicator. The problem is that when I use it, it appear correctly but when I scroll it dissapear. I attach the indicator file. Can you help me, please?
Thank you very much -
-
Hello alibanez,
Thank you for your patience.
I am unable to reproduce the behavior on my end. Please send me your log and trace files for today so that I may look into what occurred. You can do this by going to the Control Center-> Help-> Mail to Platform Support. Please place this thread in the subject line: "http://www.ninjatrader.com/support/forum/showthread.php?t=69080"
Comment
-
Thank you. At the end I found the problem. It was that the denominator sometimes was zero. I solved the problem with the next code.
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
if (CurrentBars[0] <= BarsRequired) return;
double ValPrec = 0;
double ValVol = 0;
double VolPrec = 0;
ValPrec = ((Close[0]-SMA(Period)[0])/StdDev(Period)[0]);
ValVol = ((Volume[0]-SMA(Volume,Period)[0])/StdDev(Volume,Period)[0]);
VolPrec = ValPrec; //+ValVol;
if (VolPrec > 0 || VolPrec == 0 || VolPrec <0)
GVolPrec.Set(VolPrec);
else
GVolPrec.Set(0);
}
Thanks a lot.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
156 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
90 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
139 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
130 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment