increase lot after get stoplose.. - page 2

 

i'm sorry i checked both examples & it's working just fine

1)

if (OrderProfit() < 0 &&  OrderLots() < 0.4)

2)

if (OrderProfit() < 0 &&  OrderLots() < NormalizeDouble(Lots*3,2))
 

it's not limit the level lot.. he still open with double lot every get sl from 0.1, 0.2, 0.4, 0.8, 1.6, 3.2......

should until 0.4 if 3 level lot that wanted.. even get sl on level 3 lot, it will open using lot from 0.1 again..but it increment again untill profit..

gjol.. maybe u add something code in the other place..

this is my code :

extern double TakeProfit = 50;
extern double StopLoss = 50;
extern double Lots = 0.1;
int OT;
double OL;
string _symbol;
int Magic = 12345;
double Pip;

int init()
   {
   Pip = Point;
   //----
   if(Digits==3||Digits==5)
      {
      Pip*=10;
      TakeProfit *= Pip;
      StopLoss *= Pip;
    
      }
   }

int start()
  {
//----
CheckIfOrderEarned();
//-----
if(OrdersTotal()<1)     {
if (High[0]<High[1])   
   {
   int ticket=OrderSend(Symbol(),OP_BUY,Lots,NormalizeDouble(Ask,4),3,Ask-StopLoss*Point,Ask+TakeProfit*Point,"",Magic,Green) ;
  

   }
                        }
//----
   return(0);
  }
//+------------------------------------------------------------------+
void CheckIfOrderEarned()
   {
   int i=OrdersHistoryTotal()-1;
   //----
   OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
      {                                     
      OT = OrderType();
      OL = OrderLots();
      _symbol = OrderSymbol();
      double OP = OrderProfit();
      
      if (OrderMagicNumber() == Magic)
         {
       
      if (OrderProfit() < 0 &&  OrderLots() < NormalizeDouble(Lots*3,2))
            {
            
            Lots = NormalizeDouble(OL*2, 2); 
                                
            }
         else
            {
            Lots = 0.1;
            }
                           
         }
      }
   }
maybe miss something..
Reason: