Hello,
i need help with my EA. i need a simple trailing stop and a simple break even but i dont know how to do this.
Thats my EA Code dont laugh its my first EA ;-)
please do not change so much. if possible just only insert the trailing stop, that i can still simply put there my strategies.
ive made "dont touch" if where possible nothing should be changed
Thanks in advance
i would also pay 10$ for the programming via PayPal
sorry for my bad english
Thanks again
I think you need to work to the rest of your code, not just trailing stops . . . for example:
lot=NormalizeDouble(AccountFreeMargin()*iMaximumRisk/1000.0,1);
I suspect this may work on xxxUSD pairs when your account currency is USD . . it also uses iMaximumRisk stated as a %age, i.e. 3 meaning 3%, so iMaximumRisk= 0.02; will give you a risk of 0.02% . . . and after all that, it assumes your SL is 1 pip away.
This will give you the wrong answer if you place any trades manually or from other EAs . . . or the same EA on more than one currency pair . . . filter by Symbol and Magic number
iTotalTrades=OrdersTotal();
I think you need to work to the rest of your code, not just trailing stops . . . for example:
I suspect this may work on xxxUSD pairs when your account currency is USD . . it also uses iMaximumRisk stated as a %age, i.e. 3 meaning 3%, so iMaximumRisk= 0.02; will give you a risk of 0.02% . . . and after all that, it assumes your SL is 1 pip away.
This will give you the wrong answer if you place any trades manually or from other EAs . . . or the same EA on more than one currency pair . . . filter by Symbol and Magic number
it is my first EA ;-)
the risk is that what i need and i dont wanna change it but i need the TrailingStop and the BreakEven.
This will give you the wrong answer if you place any trades manually or from other EAs . . . or the same EA on more than one currency pair . . . filter by Symbol and Magic number
i know this problem but i dont know how to fix this ;-)
but first i need help with the TrailingStop and the BreakEven ;-)
im noob on MQL4 and learning at the time ;-)
please help me guys
Hi sunnyboy20,
here you find a simple way how a Trailing Stop can look like
https://docs.mql4.com/trading/OrderModify
but first i need help with the TrailingStop and the BreakEven ;-)
please help me please
ok i´ve read this, but i dont understand how i can add this in my EA it is too much for me.
can you say me where i must add this code in my EA ?
ok i´ve read this, but i dont understand how i can add this in my EA it is too much for me.
can you say me where i must add this code in my EA ?
Now is a great time to start learning . . . "your EA" ? if you don't know how to code how is it yours ? did you pay for it ?
ive code it by my self with help from a learning dvd ;-) i dont know the position where i must add the code, ive tried it 5 times but it wont be work
in general, see my EA structure anyway somehow quite different than the most other EA´s but for me is my structure easily to handle and not so difficult for meive code it by my self with help from a learning dvd ;-) i dont know the position where i must add the code, ive tried it 5 times but it wont be work
in general, see my EA structure anyway somehow quite different than the most other EA´s but for me is my structure easily to handle and not so difficult for meOK, fair enough.
You could create a function that looks at the open order(s) and adjusts the SL as per what you want from a trailing SL. You could call this function for each tick at the start of the start function . . . does that help ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
i need help with my EA. i need a simple trailing stop and a simple break even but i dont know how to do this.
Thats my EA Code dont laugh its my first EA ;-)
please do not change so much. if possible just only insert the trailing stop, that i can still simply put there my strategies.
ive made "dont touch" if where possible nothing should be changed
Thanks in advance
i would also pay 10$ for the programming via PayPal
sorry for my bad english
Thanks again