if you tried copy paste for trailing i conclude that you dont understand the logic behind trailing stop & has nothing to do with the language
Perhaps you should start debuging your code by testing
double Bar0Low = iLow (NULL,0,0); double Bar0High = iHigh (NULL,0,0); double Bar0Open = iOpen (NULL,0,0); double Bar0Close = iClose(NULL,0,0);and checking it does what you want it to do by using the Print("BAr0Low = ",Bar0Low") or Comment("BAr0Low = ",Bar0Low")

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 Im not new to programming but new to mql4 which is allot different then the languages im used to. I am making this EA it works but i need to add a trailing stop to it. I have tried many cut and past trailing stops none work. they ether do not trail or only trail the buys what am i doing wrong? The Ea was based on the macd sample then changed to use bollinger bands. I then found out the macd sample has order issues so i changed out the order prosessing part of the program with some code i got off this form. Please Help