
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
Ok i just realized this will require a bit more effort.
I think it's best you stick with Symbol() and just the chart instrument until you got that part of the logic working and then expand the concept to multi symbol.
I do not see any OnTick() function your code so fix that first.I think i'm in over my head now. I didn't think we needed to use the OnTick function, i thought it was an option.
Ok i just realized this will require a bit more effort.
I think it's best you stick with Symbol() and just the chart instrument until you got that part of the logic working and then expand the concept to multi symbol.
I do not see any OnTick() function your code so fix that first.so went back to the beginning and started with a new EA template. this version compiles without issues, waits and then trades the chart pair, but it keeps opening trades, so added the 'int total' in for now.
but as soon as i start to add in the mutli currency it all stops. it seems to skip everything after line 60, even though it compiles without error.
You have to set a total for each symbol;
Not just one because then you will only get one order and it will prevent any more orders because total >0
thanks for the tips, will get to that.
first got to get it to open the multi currencies, then i can count them. I've increased the value to 10, as a single currency EA it then opens 10 trades.
But as a multi currency it's not opening any, so my code for the various pairs is not triggering. I've even tried a different method for identifying the pairs, which works in a script i currently use (outline below), but it still fails at the same point.
You have to use a separate counter for every symbol in stead of one counter for all symbols.
I think it's best if you first develop the complete operational robot for one symbol and then when that is done, expand it to multi symbol.
do you have any recommended reading for this? it's not easy to find or i'm searching the wrong way for it.
assuming this below is list of multiple symbols
conceptually it should work but i am not sure if in MT4 tester multiple pairs simulation is possible by default (i skipped MQL4), others could probably help on this
So this is what i went with for the symbol counting, because i'm using both trade comments and Magic numbers which are different for Buy's and Sells, i could select both the symbol pair and if it was a Buy or Sell trade.
Thanks for everyone's help.
If you really want to push these ideas to the surface then i would advice you strongly to look into MT5 since it already has the functionality you are looking for and MT4 is very limited in that area.