Vladimir, please make it work on netting accounts.
Thank you.
Why stop orders are not calculated correctly?
The code shows that they are set in points (double for some reason):
input double m_stoploss = 65; // losses input double m_takeprofit= 100; // Profit
and then the calculation:
//--- if the Chaykin indicator value is over the scale and a potential reversal has started //--- kind of oversold //--- buying if(iClose(1)>iOpen(1) && iLow(1)<ma && ch<-m_openlevel) { double level_price=m_symbol.Ask(); double level_sl=m_symbol.Bid()-m_stoploss*m_adjusted_point; double level_tp=m_symbol.Bid()+m_takeprofit*m_adjusted_point; m_trade.Buy(m_lots,NULL,level_price,level_sl,level_tp,"Pipsover"); return; } //--- if the Chaykin indicator value is over the scale and a potential reversal has started //--- kind of overbought //--- nSell if(iClose(1)<iOpen(1) && iHigh(1)>ma && ch>m_openlevel) { double level_price=m_symbol.Bid(); double level_sl=m_symbol.Ask()+m_stoploss*m_adjusted_point; double level_tp=m_symbol.Ask()-m_takeprofit*m_adjusted_point; m_trade.Sell(m_lots,NULL,level_price,level_sl,level_tp,"Pipsover"); return; }
Stoploss and Take Profit prices should be calculated from the opening price. Otherwise there will be no correspondence of profit/loss to those stated in the settings.
Hello Vladimir. Please make it work on netting accounts.
Thank you.
Hello Vladimir. Please make it work on netting accounts.
Thank you.
This is impossible: the Expert Advisor operates with multidirectional positions, which is not applicable to netting accounts.
Hello Vladimir. Could you please make stop loss in your Expert Advisor to be set at breakeven and to be in accordance with the size of ATR, and that Moving Average could be optimised.
Thank you.
- www.metatrader5.com
There can't be a breakeven on ATR.
ATR/Point() - maybe that's what was meant? Although... too many points for breakeven. Maybe ATR*0.1/Point() - ten times less?
There can't be a breakeven on ATR.
And two stop losses can't be made, one simple with breakeven, the second by ATR, at your choice.
If this is not possible, then just by ATR, and the main thing is that Moving Average could be optimised.
Thank you.
You can't make two stop losses, one simple with breakeven, the second by ATR, at your choice.
***
If you do it, then it's like this: first the position is put to breakeven. Only after that trailing (Stop Loss modification) is switched on.
*** and the main thing is that Moving Average could be optimised.
Thank you.
About like this?

If you do it, it is approximately as follows: first, the position is moved to breakeven. Only after that trailing (Stop Loss modification) is switched on.
Approximately like this?

Yes, that would be very good. And the Profit, Loss column is Stop Loss and Take Profit?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Pipsover:
Author: Vladimir Karputov