Hi,
I am trying to learn how to use the MDK. I have written a few indicators that I have acyually been able to place in MeatStock. I am having a hard time trying to write the following program. I want to use the crossing of MACD and its signal line to create a table in the Expert Avdvisor. Below is an example of what I am trying to do.
S0 S3
S1 S2
B0 B2 S4
-------------------------------------------------------------------------------------------------------------------------------------------Zero Line
B1 B3
According to Gerald Appel, a valid buy signal occurs when the MACD has crossed from above zero
to below zero since its last buy signal. Therefore, in the above graph, the only valid buy signals are B1 and B3.
I am unable to write a program that goes into the past to find out how much the stock moved between B1 and S2 and B3 and S4. I would like to find the percent move the closing price made for all the days between B1 and S2 and the percent move the closing price made for al the days in between B3 and S4. Thisis only a short version as I would like to do this for four years of data.
Once that is done, I would like to find the minimum, median and maximum % move the stock made and place it in the expert advisor or where ever any body thinks it belongs.
Any input would be greatly appreciated,
Flash