Re: Correlation Indicator code help

2
borgesr wrote:Dear Mladen,
The NeutralHedge Overlay_v5 indicator works without errors in the chart.
But when I try to do backtesting there is a division error by zero in the line (line 181) below.

 

Code: Select all

PipsRatio = ( CurRangeHigh - CurRangeLow )  / ( SubRangeHigh - SubRangeLow );
Could you correct this bug?

Thank you,
Rogério
Try it out now

Re: Correlation Indicator code help

3
Thank you Mladen,
Now the indicator works without errors.

Is it possible to backtest multiple currency pair on the same EA?
I'm trying to send 2 orders with different pairs and the error below occurs.
Error: OrderSend error 4106

I am using the code below to send the orders

Code: Select all

par1="ERUUSD";
par2="GBPUSD";

numeroorden=  OrderSend(par1,OP_SELL,par1_lot, MarketInfo(par1, MODE_BID),15,0,0,ComentOrdem,magcnumber,0,Red); // Sell EURUSD

numeroorden=  OrderSend(par2,OP_BUY,par2_lot, MarketInfo(par2, MODE_ASK),15,0,0,ComentOrdem,magcnumber,0,Green); // Buy GBPUSD
The error only occurs in the backtest

Thank you,
Rogério

Re: Correlation Indicator code help

4
borgesr wrote:Thank you Mladen,
Now the indicator works without errors.

Is it possible to backtest multiple currency pair on the same EA?
I'm trying to send 2 orders with different pairs and the error below occurs.
Error: OrderSend error 4106

I am using the code below to send the orders

Code: Select all

par1="ERUUSD";
par2="GBPUSD";

numeroorden=  OrderSend(par1,OP_SELL,par1_lot, MarketInfo(par1, MODE_BID),15,0,0,ComentOrdem,magcnumber,0,Red); // Sell EURUSD

numeroorden=  OrderSend(par2,OP_BUY,par2_lot, MarketInfo(par2, MODE_ASK),15,0,0,ComentOrdem,magcnumber,0,Green); // Buy GBPUSD
The error only occurs in the backtest


Thank you,
Rogério
Rogério

No, you can not backtest multi currency EA using mt4


Who is online

Users browsing this forum: No registered users and 19 guests