- Alert
- CheckPointer
- Comment
- CryptEncode
- CryptDecode
- DebugBreak
- ExpertRemove
- GetPointer
- GetTickCount
- GetTickCount64
- GetMicrosecondCount
- MessageBox
- PeriodSeconds
- PlaySound
- PrintFormat
- ResetLastError
- ResourceCreate
- ResourceFree
- ResourceReadImage
- ResourceSave
- SetReturnError
- SetUserError
- Sleep
- TerminalClose
- TesterHideIndicators
- TesterStatistics
- TesterStop
- TesterDeposit
- TesterWithdrawal
- TranslateKey
- ZeroMemory
ExpertRemove
The function stops an Expert Advisor and unloads it from a chart.
void ExpertRemove(); |
Return Value
No return value.
Note
The Expert Advisor is not stopped immediately as you call ExpertRemove(); just a flag to stop the EA operation is set. That is, any next event won't be processed, OnDeinit() will be called and the Expert Advisor will be unloaded and removed from the chart.
Calling ExpertRemove() in the strategy tester inside the OnInit() handler cancels testing on the current set of parameters. Such completion is considered an initialization error.
When calling ExpertRemove() in the strategy tester after successful initialization of an EA, a test is completed normally with the call of OnDeinit() and OnTester(). In this case, the entire trading statistics and an optimization criterion value are obtained.
Example:
//+------------------------------------------------------------------+
|
See also