As a rule, ZigZag indicator is used to calculate maximal possible profit. Just take extremums inside your crossings.
marketeer:
As a rule, ZigZag indicator is used to calculate maximal possible profit. Just take extremums inside your crossings.
As a rule, ZigZag indicator is used to calculate maximal possible profit. Just take extremums inside your crossings.
Why do you need ZigZag for that ? Just calculate the maximum/minimum between 2 crosses.
Something like :
double getMaximum(datetime firstCross,datetime secondCross) { double high[]; if(CopyHigh(_Symbol,_Period,firstCross,seconCross,high)!=-1) { int index=ArrayMaximum(high); if(index!=-1) return(high[index]); } return(-1); }
Thank you!
angevoyageur:
Why do you need ZigZag for that ? Just calculate the maximum/minimum between 2 crosses.
Something like :
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.
marketeer:
Really ? Why ?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.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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