Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 666

 
evillive:
mine is working as it should. leverage 500, the result is 271.38 which gives 271.38*500=135690 quid per lot without leverage.

Thank you for your participation.

So there's something at my place.

 

Good afternoon, Professionals, please tell me what I am doing wrong. I want to set a stop-loss beyond the low of the previous candle by a certain number of pips

   double LOW = iLow(NULL,0,1);  

if(Close[1]<Open[1])
   {

     send=OrderSend(Symbol(), OP_BUY, Lot,Ask,10,LOW-delta*Point,0,NULL,Magic,0,Green);
   }
 
nogard37:

Good afternoon, Professionals, please tell me what I am doing wrong. I want to set a stop-loss beyond the low of the previous candle by a certain number of pips


Does your broker allow you to set the SL on opening? Also, we need to normalize the calculated value of the SL to make it more correct.
 
evillive:

Does the broker allow you to set the SL on opening? Also, you need to normalise the calculated value of the SL to get it right.
Yes, the stop is set, but directly below the low. I normalized the value - it is set below a low anyway. Basically, it always sets under a low!!! And it does not show delta!
 
nogard37:
Yes, the stop is set, but just below the low. And I normalized the value - it's still set under the low in the test. In general, it is always set under the low!!! and the delta does not count


What does the delta and the digit of quotes equal?
 
evillive:

what is the delta and the digit capacity of the quotes?
delta=35, and the digit is five digits if I understand you correctly
 
Well that's pretty much it under Low, all right.
 
evillive:
Well, it's practically under Low, all right. Still closing under Low

extern double delta = 350;
int start()
{
   double LOW = iLow(NULL,0,1);  
if(Close[1]<Open[1])
   { 
     send=OrderSend(Symbol(), OP_BUY, Lot,Ask,10,NormalizeDouble(LOW-delta*Point,Digits),0,NULL,Magic,0,Green);
   }
Всеравно под лоу закрывается и делту не считает
 
And there is this error, the expert works but still - Empty controlled statement found
 
nogard37:

I don't know if this will help?

But, try calculating "LOW-delta;" on a separate line with the result in a separate variable and then passing it to"OrderSend"

Like this:

extern double delta = 350;
int start()
{
   double stop;
   double LOW = iLow(NULL,0,1);  
if(Close[1]<Open[1])
   { 
    stop=LOW-delta;
    send=OrderSend(Symbol(), OP_BUY, Lot,Ask,10,NormalizeDouble(stop*Point,Digits),0,NULL,Magic,0,Green);
   }