Most frustrating and unexplainable error 130! - page 2

 
ernest02:


I have now run the EA again and find that the SellPrice = Current Bid Price. (stdlib only shows the prices up to the 4th decimal although i use 5 decimal prices) This is a coincidence since I dtermine SellPrice at the start of the program at a fixed level.

This what I get from the tester journal at the moment:

11:17:42 2011.05.13 15:26 MartingaleEA EURUSD,M1: SellTicket is 0
11:17:42 2011.05.13 15:26 MartingaleEA EURUSD,M1: SellPrice is 1.4261 Are all prices NORMALISE up to symbol digits, before trade executes? Ref: OrderSend(.... parameters.
11:17:42 2011.05.13 15:26 MartingaleEA EURUSD,M1: OrderSend error 130
11:17:42 2011.05.13 15:26 stdlib EURUSD,M1: loaded successfully
11:17:42 2011.05.13 15:26 MartingaleEA EURUSD,M1: Alert: Open Sell Stop Order - Error 130: invalid stops
11:17:42 2011.05.13 15:26 MartingaleEA EURUSD,M1: Price: 1.4261 Lots: 1.9797 SellPrice: 1.4261 Stop: 1.4277 Profit: 1.4246
11:17:42 2011.05.13 15:26 MartingaleEA EURUSD,M1: SellTicket2 is -1

When the tester reports a successful transaction it uses 5 decimal prices in the report. Does it mean anything that in the Print SellPrice and in the error report (stdlib) it reports only 4 decimals?

Also:

MarketInfo(Symbol(),MODE_STOPLEVEL)==0 <------------------ Most brokers set this to a value, for technical reasons only. Not their business operations.

But there are brokers who sets this to ZERO. For their business operations. eg. OANDA.

It's better for this case, to place LIMIT orders (rather than STOP), because you will be buying at the BID (rather than the ASK).

 

11:17:42 2011.05.13 15:26 MartingaleEA EURUSD,M1: Price: 1.4261 Lots: 1.9797 SellPrice: 1.4261 Stop: 1.4277 Profit: 1.4246

check that lot size it is probably invalid

 
SDC:

11:17:42 2011.05.13 15:26 MartingaleEA EURUSD,M1: Price: 1.4261 Lots: 1.9797 SellPrice: 1.4261 Stop: 1.4277 Profit: 1.4246

check that lot size it is probably invalid

This too, need to be normalized (to min_lot significance), not just prices.
Reason: