if(OrderProfit()>some_value) { Trailing(); }
Marco vd Heijden:
OrderProfit() return the net profit value (without swaps or commissions) for the selected order.for example for different Symbol and lotsize it is not the same.
I need to check this:
if(Bid - OpenOrderPrice() > WhenToTrail*pips) //first step { // Trail SL up equal to OrderTakeProfit()-WhenToTrail*pips // from then on if Bid goes PipsToUpdate= 10 pips up, check SL and then move it up to OrderTakeProfit() - Bid }
Please watch video for sure. thanks
This sounds like OrderProfit() to me.
Please open a job here: https://www.mql5.com/en/job
Trading applications for MetaTrader 5 to order
- www.mql5.com
The EA will use 3 EMA with different periods to identify trend direction. Also, we would need an indicator for defining price extremums, such as ZigZag (if you have a better one, we can use it instead). 1. pending order is placed. by default, the pending order is 0.01 lots 2. stop loss line and take profit line both appear. Stop loss line...
Marco vd Heijden:
I can handle it. thanks
This sounds like OrderProfit() to me.
Please open a job here: https://www.mql5.com/en/job
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 am trying to make a dynamic trailing stop. Instead of moving the stoploss every point in profit, it only moves the stop loss after X amount in profit. And amount of stoploss must be equal to distance between Takeprofit and bid. For example When price reached WhenToTrail variable, EA must trail stoploss to the amount of TakeProfit - Bid for buy order. After that EA check TrailingStep and when price goes up x pips(step) amount of Stoploss must be equal to distance of Takprofit and Bid.
Below is my code. It is worked for external variable and I use EditBox and got Error for static variable. Is it possible to code it differently without static?
And I got this idea from this video.