거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Twitter에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
당사 팬 페이지에 가입하십시오
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
- 게시자:
- Kailash Bai Mina
- 조회수:
- 8079
- 평가:
- 게시됨:
- 2022.04.21 07:38
-
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
MT4:
//--- importing required dll files #include <WinUser32.mqh> #import "user32.dll" int GetAncestor(int, int); #define MT4_WMCMD_EXPERTS 33020 #import //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void SetAlgoTradingTo(bool trueFalse) { //--- getting the current status bool currentStatus = IsTradeAllowed(); //--- if the current status is equal to input trueFalse then, no need to toggle auto-trading if(currentStatus != trueFalse) { //--- Toggle Auto-Trading int main = GetAncestor(WindowHandle(Symbol(), Period()), 2/*GA_ROOT*/); PostMessageA(main, WM_COMMAND, MT4_WMCMD_EXPERTS, 0 );//Toggle Expert Advisor button } }
MT5:
//--- importing required dll files #define MT_WMCMD_EXPERTS 32851 #define WM_COMMAND 0x0111 #define GA_ROOT 2 #include <WinAPI\winapi.mqh> //+------------------------------------------------------------------+ //| Toggle auto-trading button | //+------------------------------------------------------------------+ void AlgoTradingStatus(bool newStatus_True_Or_False) { //--- getting the current status bool currentStatus = (bool) TerminalInfoInteger(TERMINAL_TRADE_ALLOWED); //--- if the current status is equal to input trueFalse then, no need to toggle auto-trading if(trueFalse != newStatus_True_Or_False) { //--- Toggle Auto-Trading HANDLE hChart = (HANDLE) ChartGetInteger(ChartID(), CHART_WINDOW_HANDLE); PostMessageW(GetAncestor(hChart, GA_ROOT), WM_COMMAND, MT_WMCMD_EXPERTS, 0); } } //+------------------------------------------------------------------+
![Account History Export](https://c.mql5.com/i/code/script.png)
Export the history of transactions on the MT4 trading account.
![ADXm (experiment)](https://c.mql5.com/i/code/indicator.png)
ADXm experiment (metatrader 4 versions)
![Listing all MT4 Signals' properties to a CSV file](https://c.mql5.com/i/code/script.png)
This simple quick & dirty script code will output a CSV file of all the Signals' properties as reported by the MQL4 Trade Signals functionality.
![Detecting the start of a new bar or candle](https://c.mql5.com/i/code/expert.png)
Detecting the start of a new bar or candle, in the OnTick() event handler of an expert advisor.