I need to create an efs which will plot a histogram of the gap between the K & D lines of a Stochastic. The histogram should oscilate around zero or 50.
angusn
You can easily accomplish that by modifying the basicStoch.efs that is in the EFS2 Basic folder.
First replace return new Array (stochK(14,1,3),stochD(14,1,3)); with return (stochK(14,1,3)-stochD(14,1,3));
Then in preMain replace setPlotType(PLOTTYPE_LINE,0); with setPlotType(PLOTTYPE_HISTOGRAM,0); and add setHistogramBase(your number); to set the centerline of the histogram.
Alex
angusn
Adding to my prior reply. If instead you are using a version earlier than 7.9 then you can find here an EFS1 study that will calculate the difference between %K and %D and plot that as a histogram.
Alex
Comment