Question for a "LibOrderReliable" guru...

 

Hi all, I'm using the LiborderReliable routines on the advice of (I think it was) forum member "7Bit"... so far it's been a godsend, it's really helped clean up some nagging little problems with my EA. In doing some further testing today, I had this scenario... which may be normal but I'd just like to bounce it off of someone:

My EA placed a trade on the EURAUD earlier today for a BUY STOP at 1.42309, sl:1.42125, and tp:1.42493. The current market price of EURAUD at that very time was 1.42221. LibOrderReliable printed this message to my log file as it tried to place that order:


11:28:53 LibOrderReliable EURAUD,H1: OrderSendReliable v3.1: • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •
11:28:53 LibOrderReliable EURAUD,H1: OrderSendReliable v3.1: Attempted BUY STOP 0.17000000 lots @1.42309000 sl:1.42125000 tp:1.42493000
11:28:53 LibOrderReliable EURAUD,H1: OrderSendReliable v3.1: Pending BuyStop has ERR_INVALID_STOPS; new price = 1.42353
11:28:53 LibOrderReliable EURAUD,H1: OrderSendReliable v3.1: NOTE: SL (now 1.42169) & TP (now 1.42537) were adjusted proportionately
11:28:53 LibOrderReliable EURAUD,H1: EnsureValidStops v3.1: SL was too close to brokers min distance (100); moved SL to: 1.42169000
11:28:53 stdlib EURAUD,H1: loaded successfully
11:28:53 LibOrderReliable EURAUD,H1: OrderSendReliable v3.1: Result of attempt 1 of 10: Retryable error: 130 :: invalid stops

11:28:53 LibOrderReliable EURAUD,H1: OrderSendReliable v3.1: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~


... it went ahead and placed the adjusted order fine, but I'm just wondering why it thought the original entry price (1.42309) was unacceptable. The market price at that time was 1.42221... that's 8.8 pips away, shouldn't that be far enough away from the market? It mentions also about "brokers min distance" being 100 - does that mean 10.0 pips?


Thanks!

Shawn

 
You can check this with the MarketInfo() function, its one of its possible return values, before you send the order. The non-majors or exotic crosses might have wider minimal stops, wider than one might think sometimes.
 

Thanks 7bit - would it be "MODE_STOPLEVEL" that I need to use with MarketInfo() ?


Thanks!

Shawn

Reason: