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

 
LBatters:

Ah, I see. Thank you.

Now there's the problem of 130.

What they say in the reference.

StopLoss and TakeProfit prices cannot be too close to the market. The minimum distance in points can be obtained using theMarketInfo()function with the MODE_STOPLEVEL parameter. Error 130 (ERR_INVALID_STOPS) is generated in case of erroneous or non-normalized stops.

here is the code.Do I need to normalize the stops?


At alpari stoplevel=0 but stops on price are not accepted, they are such scammers, it's a bummer for them to pass the stoplevel normally. i have to take 2 spreads instead of the stoplevel.

but in general, such narrow stops are a waste of money, they will be triggered too often.

 
I've got 50 pips stops, but I did it out of the blue. The problem is that the EA does not want to set them, I get an error 130, but I do not know what I should normalise.
 
LBatters:
I've got 50 pips stops, but I've just put them there out of the blue. The problem is that the EA does not want to set them, I get an error 130, but I don't understand what I have to normalise.


Who sets stops like that? A stop is a price at which the order is closed, it's the price, not the number of points. To buy

SL=NormalizeDouble(Ask-Stop*_Point,_Digits);

TP=NormalizeDouble(Ask+Profit*_Point,_Digits);

 где Stop=500, Profit=500 пунктов.

 
evillive:

Who puts stops like that? A stop is the price at which the order closes, not the number of points.

I was stupid. Thanks for the tip.)
 
LBatters:

Hi all, can you please help me with this problem. i have been working with the function written in this article https://www.mql5.com/ru/articles/1357. i decided to check how the orders are opened by the signals from this function and wrote some simple code:

And Metatrader gives out this:

I don't know what to do with it.

I attached the function code.

Oops. Thank you. I will correct the code to meet the new requirements. I will remove the error of array overrun at the same time.

Ehhhhh...

 
Hello, could you please tell me how or what function can be used to move a pending order to a new price level?
 
jekk:
Good day, could you please tell me how or what function to use to move a pending order to a new price level?
OrderModify, there are no others.
 
Got it, thanks!
 
How to find objects that are in a separate sub-window?
Looks like (haven't tested yet) one option is to use ObjectFind, going through all objects from all windows.
Is it possible to limit the search to just the objects of a particular sub-window at once?
 
atztek:
How to find objects that are in a separate sub-window?
Looks like (haven't tested yet) one option is to use ObjectFind, going through all objects from all windows.
Is it possible to limit yourself to just objects in a particular sub-window at once?


Not only you can, you have to.
Reason: