Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 850
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
Generally, the check is like this
OrderSelect(ticket,SELECT_BY_TICKET);
if(OrderProfit()<0) { }
And you can put anything you like in brackets. I use it this way, for example, to make "martin" method work )
mitanq, thank you.
And what should we put in place of ticket to select the last opened order?
mitanq, thank you.
What should I put in place of ticket to select the last open order?
I understand that, but how is it determined, by what method? The meta-editor swears at ticket when compiling.
I understand that, but how is it determined, by what method? The meta-editor swears at ticket during compilation.
Of course, it wouldn't, if the ticket is not defined and the ticket variable is not even declared. And the ticket must be recognized by the same OrderSelect(), no matter how paradoxical it may seem. The only thing we need is to apply in the loop of all open orders and select in order - OrderSelect(x,SELECT_BY_POS), where x is the number of loop iterations. And then, if the selected order meets all of your requirements for it, ticket=OrderTicket().
There are so many Expert Advisors in Kodobase especially for the example, do not be lazy, look through them, they will do for training. And read the help.
It wouldn't be, if the ticket isn't defined and the ticket variable isn't even declared. And we should recognize the ticket using the same OrderSelect(), no matter how paradoxical it may seem. The only thing we need is to use in the loop of all open orders and select in order - OrderSelect(x,SELECT_BY_POS), where x is the number of loop iterations. And then, if the selected order meets all of your requirements for it, ticket=OrderTicket().
There are so many Expert Advisors in Kodobase especially for the example, do not be lazy, look through them, they will do for training. And read the help.
Friends, who can repair this indicator?
/* Decompiled deleted. The author has been warned. Vinin */
Friends, who can repair this indicator?
I asked the question above. About the EA trading on every bar. How do I make the indicator check on every tick? Can you tell me? The code was shown above.
Is it so hard to remove the dots yourself and not put a decompiled file here?
Simply remove the condition to control a new bar, and OnTick() is always executed on every tick.
Put ontick instead of time[0] ?