
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
What about Ticket chart type?
Did you select the correct Order first ?
I'm not sure how to select it!
I'm working on it.
You mean Order Type ?
Correct.
Correct.
Did you select the correct Order first ?
How can I do it please?
How can I do it please?
You already do it in this code . . .
. . . just make sure you have selected the correct Order, if one exists before you try to use OrderType, or get the typee in that function.
I tried every things, but I can't!!
Dear RaptorUK, you have my complete codes, just tell me what shall I do please!
Best Regards
This code should work. It uses your definitions, and coding. I have to warn you that you have to work on it to make sure it works properly in ALL cases.
I did some of that (check for OrderType OP_SELL separately, else is not the best way to go since there are other order types). There are many things that have to be added for it to be a good tool. For example, now it will only show the type of the last order if you have more than one, it will not disappear when there are no positions, etc.
So take it from here and work on it. It will be a good start for learning MQL.
As you say, It shows the last order type! My problem is that! I want it to show current chart order type!
Thanks pro_
If it works for you - fine. I am glad. But my view is that any indicator should be universal as much as possible, and not good for some specific situation only. You do it once but do it properly, so that if you need to change something or situation changes in terms of your positions it works correctly.
Anyway, you are welcome.