I have written an EA that scans several currency pairs and when it finds a particular condition it mus alert me.
Now I find that the EA gets seemingly in a loop on one currency pair (USDCHF) and does not operate correctly. Here is the message from the Journal:
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: loaded successfully
notice: EMPTY_VALUE = 2147483647
if (UpLong == 2147483647) UpLong = 0; if (UpLong2 == 2147483647) UpLong2 = 0;
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: loaded successfully
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: removed
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: loaded successfully
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: removed
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: loaded successfully
notice: EMPTY_VALUE = 2147483647
Sorry, but I am missing the point.
Please expand if you do not mind
Sorry, but I am missing the point.
Please expand if you do not mind
not really important.
you can use the EMPTY_VALUE constant when you don't want to bother with this long number :-)
Don't hard code numbers |
Use the constants |
---|---|
2147483647 | EMPTY_VALUE |
0 | PRICE_CLOSE |
0 | DRAW_LINE |
0 | MODE_MAIN |
0 | MODE_SMA |
0 | OBJPROP_TIME1 |
0 | NULL |
0 | OP_BUY |
0 | WHOLE_ARRAY |
Guys,
Thanks for all the advice.
It seems to me that the problem was NOT using capitals in in the currency pair's names. I picked this piece of code (scanning pairs one by one) up from this site and the pairs was defined as I had them originally. I hought this programmer knew what he was doing.
Cost me a lot of time though!
Hope this EA will now start giving me signals on my live account.
Will let you know if the problem is still not solved.
Ernest.
Sorry Guys! The EA is still not working. It stopped that load/remove loop of the USDCHF currency when I made all the names of the pairs in capital letters, but now it only loads 3 pairs (EURUSD; USDCHF and USDCAD) and none of the other.
Then it only loops through the code for the pair on which the EA is loaded, ie GBPUSD. It does not go to the other pairs at all. How can I get the code to loop through all the pairs and not just the one the EA is loaded on?
Need your help. I am completely out of my depth here!
Ernest.
Sorry Guys! The EA is still not working. It stopped that load/remove loop of the USDCHF currency when I made all the names of the pairs in capital letters, but now it only loads 3 pairs (EURUSD; USDCHF and USDCAD) and none of the other.
Then it only loops through the code for the pair on which the EA is loaded, ie GBPUSD. It does not go to the other pairs at all. How can I get the code to loop through all the pairs and not just the one the EA is loaded on?
Need your help. I am completely out of my depth here!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have written an EA that scans several currency pairs and when it finds a particular condition it mus alert me.
Now I find that the EA gets seemingly in a loop on one currency pair (USDCHF) and does not operate correctly. Here is the message from the Journal:
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: loaded successfully
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: removed
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: loaded successfully
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: removed
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: loaded successfully
22:35:16 2013.01.10 00:00 NonLagMA_v7.1 Usdchf,H1: removed
Could somebody please have a look at my code and tell me what i am doing wrong?