Can someone help me fix my EA trailing stop loss - page 3

 
May you help me with at least a clue how to solve this
The EA is still printing error [invalid stops] after you normalized tp and sl. 
Could it be that Trail stop, step, sl or tp is too close to the pricing with Trailing Stop

 
JayB :
May you help me with at least a clue how to solve this
The EA is still printing error [invalid stops] after you normalized tp and sl. 
Could it be that Trail stop, step, sl or tp is too close to the pricing with Trailing Stop

Before placing Stop Loss and Take Profit, it is the USER who must think with his own head. You are solely responsible for the Stop Loss and Take Profit levels. Before setting these levels you should check the specification of the symbol. Checking the symbol specification - in the ' Market Watch ' window, right click and the 'Specification' menu.

 
Vladimir Karputov:

Before placing Stop Loss and Take Profit, it is the USER who must think with his own head. You are solely responsible for the Stop Loss and Take Profit levels. Before setting these levels you should check the specification of the symbol. Checking the symbol specification - in the ' Market Watch ' window, right click and the 'Specification' menu.

Oook. Which parameters in the specification window should i then use to determine how i calculate tp and sl?

From trading this strategy manually when i trade boom/ crash 500 i use sl of 5000 points which is equivalent to $1. 

Now honestly i am not sure where exactly to make the changes because i have been changing figures for InpStopLoss and InpTakeProfit.
The error is still coming. I am a bit confused.

And one more thing, did you leave InpTrailingStop (25) and Step (5) in pips or points?
 
JayB :
Oook. Which parameters in the specification window should i then use to determine how i calculate tp and sl?

***

See all properties. Read the article:  The checks a trading robot must pass before publication in the Market


JayB :
***

And one more thing, did you leave InpTrailingStop (25) and Step (5) in pips or points?

In 'points':

points

the code:

//--- Points (1.00045-1.00055=10 points)
   m_stop_loss                = InpStopLoss                 * m_symbol.Point();
   m_take_profit              = InpTakeProfit               * m_symbol.Point();
   m_trailing_stop            = InpTrailingStop             * m_symbol.Point();
   m_trailing_step            = InpTrailingStep             * m_symbol.Point();
The checks a trading robot must pass before publication in the Market
The checks a trading robot must pass before publication in the Market
  • www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
 
hello my EA's  CheckBreakEvenStop doesn't work. please help me
 
ironsky27 :
***
         

Use the button Codeto insert the code 

 
   #include <Trade\Trade.mqh>
   CTrade trade;
void OnTick()
  {
  double ask=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
  
  if(PositionsTotal()<1)
  
  trade.Buy(0.01,NULL,ask,(ask-200*_Point),(ask+200*_Point),NULL);
  
  CheckBreakEvenStop(ask);
  
  
  }
void CheckBreakEvenStop(double ask)
   {
   for (int i=PositionsTotal()-1; i>=0; i--)
   {
   
      string symbol=PositionGetSymbol(i);
      
      if(_Symbol==symbol)
      {
      
         ulong positionticket=PositionGetInteger(POSITION_TICKET);
         
         double positionbuyprice=PositionGetDouble(POSITION_PRICE_OPEN);
         
         if(ask > (positionbuyprice + 100* _Point))
         {
            trade.PositionModify(positionticket,positionbuyprice,0);
            }
            }
            }
            }
         
  

  
 
Vladimir Karputov:

Use the button to insert the code 

i sent it
Reason: