[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 335

 
fore-x:

That's not all, does normalisation over plus still work?


That would be doubling.
 
Roger:

That would be doubling down.
Why would it be? https://docs.mql4.com/ru/basis/operations/assign
 
Roger:

Y-yes, they are always used at the same time, the trailing stop moves the stoploss.

Wow, is it possible to prescribe them separately? I'm just a little confused,

it's a trailing stop from a mcd sample.

// check for trailing stop
            if(TrailingStop>0)  
              {                 
               if(Bid-OrderOpenPrice()>Point*TrailingStop)
                 {
                  if(OrderStopLoss()<Bid-Point*TrailingStop)
                    {
                     OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);
                     return(0);
                    }
                 }
              }
           }
 


Well, read it.

Увеличение значения переменной у на x                  у += x;

You already have x and you add another x, but normalised

 
Roger:


Well, read.

You already have x and add another x, but normalised

OK, it's nighttime, you've gone a little crazy, x = 4, y = 30 ----> eight it doesn't work (doubling).

Thanks for your help, I'm going to bed, bye.

 
skyjet:

Wow, is it possible to prescribe them separately? I'm just a little confused,

it's a trailing stop from a mcd sample.


In this example, when the order goes positive by more than the trailing stop, the stoploss will start moving up, whether it has been set before or not.
 
fore-x:

OK, it's nighttime, you've gone a bit crazy, x = 4, y = 30 ----> eight doesn't work (doubling).

Thanks for your help, I'm off to bed, bye.


Well, who's the one who's been turned over...?

You had

x += NormlizeDouble(x,y);

x=4, add 4 more to the thirtieth digit, it's 8........ Almost doubling.

 
Roger:


Well, who's the one who's got the jitters...?

You've got

was x=4, add another 4 to the thirtieth digit, it's 8....... Almost doubled.

That's it, I've had a smoke now and I'm relieved, I was talking about the code:

profitsell += NormalizeDouble((OrderOpenPrice() - askline)/Point*tickvalue*OrderLots(),2);

My apologies, I was wrong.

Here's a little bedtime challenge for you:


 
fore-x:

Here's a bedtime challenge for you:


And so, here we are:


It looks like the numbers that the terminal displays are just passed through doubletostr? I'll have to check it tomorrow, I've encountered this kind of thing before.

 
Roger:

In this example, when the order goes up by more than the trailing stop, the stop loss will move upwards, regardless of whether it has been set before or not.
What if the EA does not open in the direction of the subsequent move or does not reach the trailing stop? What I mean is, if a Stop Loss is used with a Trailing Stop, can I add another Stop Loss separately to the Trailing Stop?