Experts: Pipsover

 

Pipsover:

Pipsing Expert Advisor. It works based on the iChaikin (Chaikin Oscillator) and iMA (Moving Average, MA) indicators.

Author: Vladimir Karputov

 

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.

 
Shara1:

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.

Общие принципы - Торговые операции - MetaTrader 5
Общие принципы - Торговые операции - MetaTrader 5
  • www.metatrader5.com
Перед тем как приступить к изучению торговых функций платформы, необходимо создать четкое представление об основных терминах: ордер, сделка и позиция. — это распоряжение брокерской компании купить или продать финансовый инструмент. Различают два основных типа ордеров: рыночный и отложенный. Помимо них существуют специальные ордера Тейк Профит...
 
Shara1:

Hello Vladimir. Could you please make it possible to optimisethe Stop Loss in your Expert Advisor so that it would be set at breakeven and would be the same size as the ATR, and that the Moving Average could be optimised.

Thank you.

There can be no breakeven on ATR.

 
Vladimir Karputov:

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?

 
Vladimir Karputov:

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.

 
Shara1:

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.

Shara1:

*** and the main thing is that Moving Average could be optimised.

Thank you.

About like this?



 
Vladimir Karputov:

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?