- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor -
Don't try to do that. There are no buffers, no IndicatorCounted() or prev_calculated. No way to know if older bars have changed or been added (history update.)
Just get the value(s) of the indicator(s) into EA/indicator (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 programming forumBut, since your indicator doesn't have any buffers you can't do that. All you can do is read the objects created.
- The indicator just creates text objects of opened orders. It never deletes them.
- Mehmet Cak: close that order when i click on text.Just enable Tools → Options (control+O) → Charts and enable Show trade levels and then you can right click and close any order; no code required.
- Otherwise, go write your EA. Go through the text objects and see if one is selected, then close.
- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor -
Don't try to do that. There are no buffers, no IndicatorCounted() or prev_calculated. No way to know if older bars have changed or been added (history update.)
Just get the value(s) of the indicator(s) into EA/indicator (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 programming forumBut, since your indicator doesn't have any buffers you can't do that. All you can do is read the objects created.
- The indicator just creates text objects of opened orders. It never deletes them.
- Just enable Tools → Options (control+O) → Charts and enable Show trade levels and then you can right click and close any order; no code required.
- Otherwise, go write your EA. Go through the text objects and see if one is selected, then close.
Thank you. Actually there is no need for this but i wanted this to use on tester. MT4 tester is inefficient in so many ways. I think i should find a new way to see order profit on chart. Any way thank a lot..

- 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 this indicator. It is writing order info on chart.
I want to turn this indicator into an EA that will close that order when i click on text.
Is there a way to do this, any help will be appreciated..