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
Here it is.
Regards
See https://www.mql5.com/en/forum/150195/page6#924239 for a better way
I've seen it and tested it too.
It also doesn't solve the problem with 'Stop Loss' and 'Least Profit Locking' which I just need to make this EA complete.
This is beginning of your code
explain what is this code doing and
why has it do this.... and when does it happen
what do you want this code is doing
do you know iLastError if there is an error ??
ohh, Thanks. You have opened my eyes.
It's closing all the open orders whenever it's getting executed because the Condition is:
if (OrderProfit()<0.03)
So it'll close all the just opened orders naturally.
My aim was if a trade goes into profit say $0.1 and then if that trade turns back, it'll get closed with the least profit of say $0.01.
Probably it's not possible by 'OrderProfit()' function.
I'd have to use the trailing stops thing.
I've seen it and tested it too.
It also doesn't solve the problem with 'Stop Loss' and 'Least Profit Locking' which I just need to make this EA complete.
what did you wanted to code ???
what problem is there with stoploss
at breakeven you have least profit locking for first two trades like you wanted,..... i thought
what did you wanted to code ???
what problem is there with stoploss
at breakeven you have least profit locking for first two trades like you wanted,..... i thought
Please Pardon me.
I couldn't set the parameters correctly.
Yes, this is it! Thanks a lot.
SL Moved for First Two trades and the TP too.
I used this settings now:
extern double BreakEven =5;
extern double BreakEvenSL =1;
extern double TrailingStop =10;
extern double TrailingStep =3;
Just for clarify the concept:
If the market moves 5 pips in profit from open price, the Stop Loss will be set at 1 pip profit. Then the function of Trailing Stop will start.
With a Trailing Stop of 10, if the market moves 10 pips in profit from the opening price, the Stop Loss will become at 3 pips in profit, right?
And then if the market reaches 10 pips more i.e. 20 pips in total, the SL will be at 6 pips in profit?
Regards