[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 773

 
and a bigger slip just in case it's 0 or 1 :)
 
sergeev:
Normalize the stop prices.

Would you mind going into a little more detail about this, preferably with an example,

NormalizeDouble(); how and where to put it?

 
Techno:
And a bigger slip just in case it's 0 or 1 :)


int Slippage = 3; // Price slippage

Have you thought about 3 or not enough?

 
FoxUA:


int Slippage = 3; // Price slippage

I thought 3 was worth it, or is it too little?

Put 5 and see if it changes.
 
Techno:
Well put five, see if it makes a difference.
Don't get confused. 0 slippage is fine for a tester too. The only problem here is normalisation.
 
FoxUA:


int Slippage = 3; // Price slippage

Do you think 3 is worth it or is it not enough?


It is better to bind slippage not to the exact number of points, but to the value of points per 1 tick made by a trading instrument. The matter is that, for example, the Dax index makes 5 points per tick - this is its minimum. Therefore, to specify slippage of 3 points for it is the same as not to specify anything. It means that it is necessary to calculate how much the trade instrument makes in 1 tick minimum and multiply this number by your three (by your int Slippage = 3).

You are asking whether three points is a lot or not - such a question can only be asked by someone who is not aware of what slippage is and does not understand its importance in fast and calm markets. Read the terminal spam.

 
sergeev:
Don't get confused. 0 slippage is good for tester too. The only problem here is normalization.

Yes, it must be in normalization because changing the slippage did not give anything, but where and how do I insert this normalizeDouble(); ?

 
drknn:


The slippage is better to be bound not to the exact number of points, but to the value of points per 1 tick made by a trading instrument. The matter is that, for example, the Dax index moves 5 points per tick - this is its minimum. Therefore, to specify slippage of 3 points for it is the same as not to specify anything. It means that it is necessary to calculate how much the trade instrument makes in 1 tick minimum and multiply this number by your three (by your int Slippage = 3).

You are asking three points whether it is a lot or not - the kind of question only someone who is not aware of slippage and does not understand its importance in fast and calm markets can ask. Read the terminal's spam.


i don't have a problem with stops as i've been told, but how to normalize it?

 
PR=Ask;
PR=NormalizeDouble(PR,Digits);
TicketBuy=OrderSend(SMB,OP_BUY,StartLot,PR,Proskalz,0,0,NULL,MAGIC,0,CLR_NONE);
if(TicketBuy<0){
  Print("Ошибка № ",GetLastError()," при установке бай-ордера");
}
 
eugggy:
Seems to work, only i>=2, if 0 or 1, it returns -1 and 0 respectively. Thanks.
Wrong, it didn't work. Now it's the opposite situation, now the first bar has to meet the criteria.
Reason: