Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 502
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
so it should check if there are no open positions with this wizard at all, no matter with what time of opening..... a simple limit on the wizard....toast
if(ExistPositions(NULL,-1,44444,-1)==false)//if there are no open positions with this magic number then check......
.... or maybe I do not understand.... I have -1 because I do not care when a position opened ..... anyway it will open only on a new bar and when the old one is closed because the conditions specify that the position can open only if there are no open positions with this magic number
to make it even simpler: open position and wait until it closes.... when it closes then opens again and certainly should not open on every bar a position with such a magician.... it is checked again if there are no open positions with such magician
So put 0 in the last parameter, so that it doesn't matter when the position is opened.
So put 0, in the last parameter, so it won' t matter when the position opened.
I did that and it didn't help, it still generates a position on every bar
if(!ExistPositions(Symbol(),-1,44444))OpenPosition(Symbol(),OP_BUY,0.1,Ask-sl*Point,Ask+tp*Point,44444)
poprobuj
it doesn't work either, still stamping a trade on every bar
it does not help still stamping on every bar
found the mistake..... it is all about the symbol I was setting that I do not care what symbol to look for as long as it would not be with this magician but when I set that the current one is ok to start....though strange because if it is not on the current symbol and is on another then we would not have to open the deal until it closes on the other symbol with this magician
How can I introduce a parameter such as the angle of a moving average with certain parameters into an EA?
It depends on what to prick )))
How do I prevent a limit from being set if it's already there?
How can I prevent a limit from being set if it's already set?