You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
WHRoeder, thanks for helping, but right now it's not important if indicator is useless or not. Because I'm a beginner in MQL, I try to understand why iCustom doesn't get signal from this indicator when the arrows appear. Sorry if my questions are trivial, but I will be grateful if you give me some solution of this problem.
This is my current TestLukas code:
int pips_sl;
double lots;
int init()
{
pips_tp = 100;
pips_sl = 50;
lots = 0.1;
return(0);
}
int start()
{
double arrowUp = iCustom(NULL,0,"sidus",14,21,17,true,2,1);
double arrowDown = iCustom(NULL,0,"sidus",14,21,17,true,3,1);
if (arrowDown >0 && arrowDown!=2147483647 && OrdersTotal()==0)
OrderSend(Symbol(),OP_SELL,lots,Bid,0,Bid+pips_sl*Point,Bid-pips_tp*Point,"SELL",16384);
if (arrowUp >0 && arrowUp!=2147483647 && OrdersTotal()==0)
OrderSend(Symbol(),OP_BUY,lots,Ask,0,Ask-pips_sl*Point,Ask+pips_tp*Point,"BUY",16385);
return;
}
The name of indicator is correct. I've changed it just for sidus.
I get orders when I get an arrow . . . .
Would you tell me how exactly did you configure your test ?
I tried this EA with H1 period, dates 01.07.2011 - 23.07.2011 and EURUSD pair
Even for GBPUSD pair it's not work properly (image below).
Maybe I forgot something. It's curious.
According to this image, as you can see some orders have sent, but if OrdersTotal()==0 and next arrow appears some order should be send. Unfortunately it's not happen for every case :(
Would you tell me how exactly did you configure your test ?
According to this image, as you can see some orders have sent, but if OrdersTotal()==0 and next arrow appears some order should be send. Unfortunately it's not happen for every case :(
I used the code you posted above . . . I added a couple of Print statements for debuging . . . my account balance was $100,000 at the start of the test. The test ran from 4th Jan 2008 to 4th Jan 2009 GU H1, model is Every tick.
Are you getting any errors in the Journal tab of the Strategy tester ?
In my version of test 3 errors occured, but I don't know what does it mean. Would you explain that ?
Those errors are due to a problem with your data . . . https://www.mql5.com/en/search?keyword=unmatched+data+error
This is my current TestLukas code:
Thanks guys for advices. You were very helpful. I've downloaded historical data with MetaTrader and now it works fine.
Best regards