Extensive Testing Assistance

 

Coders & Traders:

In my quest to build the best system I possibly can, I soundly believe the very best testing and analysis should be utilized. To diversify the data I use as well as the conditions for varying brokers, I have downloaded dozens of MT4 platforms from all different brokerages all over the world. The testing I'm doing is pretty standard back testing, optimization, some walk forward optimization, and of course running in the live market (on all of these platforms).

My question is how can my EA run perfectly on some platforms (FXDD,PFG, Forex.com) and the order send function throws me the invalid stop error (130) for other platforms. The actual stop loss value I use is 0 (but still included typical equity based SL function for optimization purposes) and my stops are controlled by time and indicators.

The three brokers MT4 platforms that are giving me trouble are:

Varengold Fox ---> German

Broco Trade------> Russia

InvestTechFX-----> Canadian

When I send an order with their platforms, I get error message 130 (with SL of 0), the brokers tell me it's in my code and I am truly lost...

Any help would be appreciated.

FPC

 

i would vary the ordersend numbers a bit and see what works with those brokers. Change SL to 5, then 10.

Broco doesn't allow any slippage control...just saying all brokers have different rules even if they are using MT4.

 

show your code.

If you are sending pending orders, that may be interpreted as a "stop" in the error result.

 

if(stopLoss > 0)
realSL = Ask - stopLoss * Point;
// Buy
ticket = OrderSend(Symbol(), OPBUY, lots, Ask, slip, realSL, realTP,
nameEA, 16334,0,Red);

Thank you for your input, guess it will just take some trial & error. I've posted my ordersend function above..pretty typica (so I think).

Thanks alot gents,

FPC

 

if(stopLoss > 0)
realSL = Ask - stopLoss * Point;

else

realSL = 0;
// Buy
ticket = OrderSend(Symbol(), OP_BUY, lots, Ask, slip, realSL, realTP, nameEA, 16334,0,Red);


The above is just to ensure that "realSL" is set to 0 (as I can't see in the code snippet whether you've already set it to 0).


Another thing is to make sure to multiply "stoploss" (together with takeprofit and slippage) by 10 for 3/5 digit brokers.


CB

Reason: