nidalzd:
How would that stop the EA though, shouldn't it be in the OnTick() event?
I developed and EA and wanted to protect it from unauthorized use , so i used time limit from an article mentioned here.
and the ea is still working normally although it is expired
nidalzd: I developed and EA and wanted to protect it from unauthorized use , so i used time limit from an article mentioned here. and the ea is still working normally although it is expired
#property strict datetime LastAllowedDate = D'2009.09.11 23:59:00'; void OnTick() { if( TimeCurrent() <= LastAllowedDate ) { Print( "You can work until ", TimeToString( LastAllowedDate ) ); } else { Print( "Demo period has expired ", TimeToString( LastAllowedDate ) ); ExpertRemove(); }; };
Stops Expert Advisor and unloads it from the chart |
ExpertRemove - Common Functions - MQL4 Reference
- docs.mql4.com
ExpertRemove - Common Functions - MQL4 Reference
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
I developed and EA and wanted to protect it from unauthorized use , so i used time limit from an article mentioned here.
and the ea is still working normally although it is expired