and I know that I may have to do it with DataSeries.
But I have not understand which times I CAN use a double,
and which times I HAVE to only use a dataseries.
The formula I create other times work, and others not .
I ask for your help to clear it out, with an example,
the EMA of ROC of MACD
For example that works ok...
mymacd.Set(MACD(12,26,9)[0]);
double rocmacd=ROC(mymacd, 1)[0];
Plot0.Set(rocmacd);
that also....works ok
mymacd.Set(MACD(12,26,9)[0]);
rocmacd.Set(ROC(mymacd, 1)[0]);
Plot0.Set(rocmacd[0]);
...but when come to the EMA, ....THIS IS NOT WORKING.
(it is being compiled and generated normaly
but the indicator does not plot anything but empty panel.)
mymacd.Set(MACD(12,26,9)[0]);
rocmacd.Set(ROC(mymacd, 10)[0]);
emaroc.Set(EMA(rocmacd, 25)[0]);
Plot0.Set(emaroc[0]);
...and THIS IS NOT WORKING too...
(it is being compiled and generated normaly
but the indicator does not plot anything but empty panel.)
mymacd.Set(MACD(12,26,9)[0]);
rocmacd.Set(ROC(mymacd, 10)[0]);
double emaroc=EMA(rocmacd,25)[0];
Plot0.Set(emaroc);
*** variables and Initialiaze, include the required lines
"private DataSeries xxx" and "xxx = new DataSeries (this)"
So, I try to understand the reason why it is not plotting...
Can anyone please tell me
1) Where is the error
and
2) If anything is wrong on the logic of using one indicator in an other building DataSeries,
until you get a final Indicator line in the Plot0...???
Thanx for all the help.
Andy.
Comment