This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

UninitializeReason


Back to topics list
avatar
32
raidsan 2009.11.13 04:05 

I notice that function UninitializeReason() define, learn from help:

REASON_REMOVE 1 Expert removed from chart.
REASON_RECOMPILE 2 Expert recompiled.
REASON_CHARTCHANGE 3 symbol or timeframe changed on the chart.
REASON_CHARTCLOSE 4 Chart closed.
REASON_PARAMETERS 5 Inputs parameters was changed by user.
REASON_ACCOUNT 6 Other account activated.


I want to use draw object to set price and time information for design some chart interactive indicator, what I need is:

1. keep the draw object position when chart close, include program exit and reopen;

2. If I delete the indicator, I want capture the indicator remove event, so I can delete the relate draw object in deinit function.

but it will return the same REASON_REMOVE in both situation.

It seems that REASON_CHARTCLOSE event is redundantly with REASON_REMOVE event in some way. (maybe, it like the windows OnClose event ?)

Could you redefine the event, statement a clear indicator DELETE event?


avatar
21
milky101 2009.11.23 00:07 
ok its out put
Back to topics list  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets