[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 483

 

Afternoon

Can someone tell me whether it is possible to open a position with a volume of 0.0001 instead of 0.01 in MT4?

 
Vasia_Pu:

Afternoon

Can someone tell me whether it is possible to open a position with a volume of 0.0001 instead of 0.01 in MT4?

It depends on the lot step of your broker. Maybe you can't...
 
FOReignEXchange:

This would be more correct. But it will only work correctly on M30, but it shows signals from M60.

If you make a detailed and universal one, you have to dig around. Who developed the code? The counted_bars is not used anywhere, although it is set.


I downloaded the source code, then asked the local guru to make the signals appear on the bar in the indicator when the ray ZZ appears.

,(a long time ago, but I remember Integer and helped) and displayed the high and low bars on which the ray is drawn ZZ.

"If you do a detailed and universal - need to dig"-If you do not mind?! Thank you for your feedback.

 
It only works on M30. You put the original indicator. To see the signal on M60, you need to put a second indicator.
 
It only works on M30. You put the original indicator. To see the signal on M60, you need to put a second indicator.
 
FOReignEXchange:
It only works on M30. You put the original indicator. To see the signal on M60, you need to put a second indicator.

Only the _m__Dinapwtar.ezigwzag_2e1s.ex4 compilation works correctly on M30
 

Here's the universal one. I didn't fix the dots. And why do you need them at all, they only get in the way. The kinks (peaks) are visible without them.

The timeframe is set in the settings.

 
FOReignEXchange:

Here's the universal one. Only I didn't fix the dots. And why do you need them at all, they only get in the way. The kinks (peaks) are visible without them.

The timeframe is set in the settings.



On closing bar (signal tchk above it) below/above level (as long as these are dinapoli levels in operation) to conclude

I cannot see the price reversal .

Thanks for the help!

 

Good afternoon!

I have found a problem with modification of Stop Loss of a pending order. The log shows OrderModify error 3.

В торговую функцию переданы неправильные параметры, например, неправильный символ, неопознанная торговая операция, отрицательное допустимое отклонение цены, несуществующий номер тикета и т.п. Необходимо изменить логику программы.

Here is a short example of how I am trying to implement it:

void Modify_Orders_All_Series_SP(double Timeframe,double plus_point,double global_trailing_SP,int Magic,double Level)

{  int    count;
   double Open_0      = NormalizeDouble(iOpen(Symbol(),Timeframe,0),Digits);
   double Low_1       = NormalizeDouble(iLow(Symbol(),Timeframe,1),Digits);
   double High_1      = NormalizeDouble(iHigh(Symbol(),Timeframe,1),Digits);
   double new_val     = NormalizeDouble(Low_1 - plus_point*Point,Digits);

   for(count = OrdersTotal()-1; count >= 0; count--)
      {  
         OrderSelect(count,SELECT_BY_POS,MODE_TRADES);

         double Op_Price = NormalizeDouble(OrderOpenPrice(),Digits);
         double Stp_Loss = NormalizeDouble(OrderStopLoss(),Digits);
         
         if(OrderMagicNumber() == Magic)
            {  if(OrderType() == OP_SELLSTOP)
                  {  if(Low_1 < Level && new_val > Op_Price && new_val < Open_0)  
                        {  OrderModify(OrderTicket(),new_val,0,0,0,DeepPink);
                           OrderSelect(count,SELECT_BY_POS,MODE_TRADES);
                           Print("02_Modify_Orders_All_SP:"," Magic_SP: ",OrderMagicNumber(),", Ticket: ",OrderTicket(),
                                 ", Op_Price: ",DoubleToStr(OrderOpenPrice(),5),", global_trailing_SP: ",DoubleToStr(global_trailing_SP,5),
                                 ", Stp_Loss: ",DoubleToStr(OrderStopLoss(),5));
                        }
                           
                     if(global_trailing_SP < Stp_Loss && global_trailing_SP > High_1)  
                        {  OrderModify(OrderTicket(),0,global_trailing_SP,0,0,DeepPink);
                           Print("Magic_SP01: Условие Trailing_OP_SELLSTOP = TRUE");
                        }
                     
                  }
               if(OrderType() == OP_SELL)
                  {  if(global_trailing_SP < Stp_Loss && global_trailing_SP > High_1)  
                       {  OrderModify(OrderTicket(),0,global_trailing_SP,0,0,DeepPink);
                          Print("Magic_SP01: Условие Trailing_OP_SELL = TRUE");
                       }
                  }
            }
      }
}

The log shows that the problem is in this location:

if(global_trailing_SP < Stp_Loss && global_trailing_SP > High_1)  
  {  OrderModify(OrderTicket(),0,global_trailing_SP,0,0,DeepPink);
     Print("Magic_SP01: Условие Trailing_OP_SELLSTOP = TRUE");
  }

-------------------------------

Where am I wrong?

 
tol64:

Where am I wrong?

get in the habit of printing all parameters that might be relevant to the error.

if (!OrderModify(...)) { Print(GetlastError()+.... OrderModify parameter list ); }