Hi guys, I´m building one EA based on MA crosses. This EA uses trailing stops. I want to find out values that would cause profit in majority of cases. I was wondering if we can calculate somehow "max achievable profit" If I open a trade just after 2 MA crosses, what is the max profit I can reach. I would need these values, their average value, modus and median. It can be displayed in chart or in xls file.
Any ideas? thanks
Why do you need ZigZag for that ? Just calculate the maximum/minimum between 2 crosses.
Something like :
double getMaximum(datetime firstCross,datetime secondCross)
What your code is supposed to return? Highest high between 2 crosses? This is far from the potential profit inbetween, marked on the screenshot.
ZigZag is a well-known tool for potential profit measurement - this is not my personal invention.