SungSungE:
Can I call script file as OnDeinit/OnInit ?
the code you show is not MQL so won't work...
The easiest thing to do is just incorporate the script into the EA...
Paul Anscombe:
the code you show is not MQL so won't work...
The easiest thing to do is just incorporate the script into the EA...
Ya ,Right now I remove the script part , Let it as mqh let EA to include it.
But I think there should be more easy way to integrate different project more easy.
But get some problem DLL loading is not allowed as test ><
TERMINAL Setting: ALLOW DLL
csv_excel.ini
[Experts]
AllowDllImport=1
void OnStart() { if(AccountInfoInteger(ACCOUNT_MARGIN_MODE)!=ACCOUNT_MARGIN_MODE_RETAIL_HEDGING) { Alert("This script can be started only on a retail hedging account (Forex)."); return; } //--- if(InpStartDate>InpEndDate) { Alert("Error: The start date must be earlier than the end date"); return; } if(ExportHistoryDeals(InpStartDate,InpEndDate,InpFileName)) { //--- open the .csv file with the associated Windows program Execute(TerminalInfoString(TERMINAL_DATA_PATH)+"\\MQL5\\Files\\"+InpFileName); Print("History is exported to ",TerminalInfoString(TERMINAL_DATA_PATH)+"\\MQL5\\Files\\"+InpFileName); } }
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Account Properties
- www.mql5.com
, then each symbol positions will be closed in the same order, in which they are opened, starting with the oldest one. In case of an attempt to close positions in a different order, the trader will receive an appropriate error. There are several types of accounts that can be opened on a trade server. The type of account on which an...
SungSungE:
There is a pop up windows can choose enable DLL import as live run EA, but as test there is no pop up window choose DLL ?
Try the 2nd tab, not the 3rd.
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
Current issue
Because loading DLL failed as test , want to project setting file to enable "AllowDLLImport"
message "2020.01.01 00:00:00 DLL loading is not allowed"
"global initialization failed", "global initialization critical error"
"tester stopped because expert initialization failed"
Need some body help do this~
I check this "https://www.metatrader5.com/en/terminal/help/start_advanced/start"
Original issue How to open script as onDeinit/OnInit
Do script file as OnDeinit/OnInit ?