PDA

View Full Version : Indicator not plotting


clfield
06-19-2009, 11:12 AM
I am having trouble getting a modified FisherTransform indicator to plot. I tried adapting the NT version to the code from an article written by John Elhers. I think that this is the code that is stopping it from plotting

double tmpValue = 1 * ((Median[0] - minLo) / num1 - 0.5) + 0.5 * Median[1];

When I replace the Median[1] with tmpValuePrev to match the original code it plots

The Median[1] is the problem. I treid changing the if(CurrentBar ==0) to
if(CurrentBar . period) without success.

NinjaTrader_Josh
06-19-2009, 11:19 AM
You need to do

if (CurrentBar < 1)
return;

Then check your Control Center logs for errors.

clfield
06-19-2009, 11:35 AM
That did the trick. However the plot is just a flat line. I am wondering why the FisherTransform provided by NT is different from the Formula published by Mr. Ehlers?

the NT code

double tmpValue = 0.66 * ((Median[0] - minLo) / num1 - 0.5) + 0.67 * tmpValuePrev;

While Ehlers code reads

double tmpValue = 1 * ((Median[0] - minLo) / num1 - 0.5) + 0.5 * Median[1];

NinjaTrader_Josh
06-19-2009, 11:49 AM
NinjaTrader should be using the generally accepted equation. You could just modify it if you wish to use a different one.

clfield
06-19-2009, 11:54 AM
Thanks for your reply. Please be assured that I was not questioning your choice. My inquiry was for personal education only.