metatrader4

Metatrader 4 control via tcp/ip [closed]

雨燕双飞 提交于 2020-01-06 03:59:05
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . Here Malte talking about MT4 Server API. Could anybody tell me some simple "how to"? where to get the DLL, install and run it inside the mt4 terminal any known "protocol commands" via the API (as Malte told, it

Can I use languages other than MQL4 on MetaTrader4?

心不动则不痛 提交于 2020-01-01 09:45:53
问题 I have a task of migrating a C# market strategy to MetaTrader. Is there any way to automate that job? (For example, is it possible to parse C# into it's AST, then make the translation?) Does MetaTrader accept other languages by any means? 回答1: Approach the task Bottom-Up -- Architecture-wise Yes, you can simplify the trouble and make MT4 become a Node, which is immediately connected peer-to-peer to your current C# Market Strategy. This alowed me to operate a cluster-based computing

How to return a string from a C++ DLL into a MetaTrader 4 code-execution ecosystem?

浪子不回头ぞ 提交于 2020-01-01 06:39:15
问题 I have following function __declspec(dllexport) wchar_t* __stdcall __getJson(wchar_t * listN){ setlocale(LC_ALL, ""); //function logic wstring ant = utf8_to_wstring(result); const WCHAR* constRes = ant.c_str(); WCHAR* tempObj=new WCHAR[ant.length()]; wcscpy(tempObj, constRes); thread Thread([tempObj]{ Sleep(1000); delete[] tempObj; }); Thread.detach(); return tempObj; } This DLL returns wchar_t* to MetaTrader4. I tried many ways to return correct value and avoid memory leaks such as set

MT4 Manager API => .Net ClrWrapper

﹥>﹥吖頭↗ 提交于 2019-12-25 17:14:09
问题 I am using mtmanapi.dll with a .Net CLR wrapper I am getting correct Ask and Bid values for symbols without any special characters in the Symbol name - ( e.g. EURUSD , GBPUSD and so on ), but if symbols have some special character in it ( e.g. EURUSD' , GBPUSD0 and so on ), then it's not fetching Ask and Bid value using a SymbolInfoGet() method. 回答1: It should work and below code returns quotes for US100, OIL.WTI, 225JPY from my server. I am using SymbolInfoUpdated() however it's similar to

MQL4: Read single value from CSV

梦想的初衷 提交于 2019-12-25 08:15:59
问题 I'm trying to fetch one value from the data source website Quandl to be used within a MetaTrader4 script. The data source site provides a method to export data via API formats including .csv , .json or .xml . I have chosen the .csv format, which the data source website then provides an API call for me to use in the following format: https://www.quandl.com/api/v3/datasets/ADB/LAB_UNEMP_JPN.csv?rows=1&api_key=my_api_key By using the rows=1 parameter in the above API call , I can choose to just

How to “tie” 3 RSI-indicators to one Bollinger Band, using IMAonArray()?

你离开我真会死。 提交于 2019-12-23 05:44:30
问题 There are 3 RSI indicators, each having its own period. I want to tie all 3 to one Bollinger Band. Tell me how to do this better? for(i=limit; i>=0; i--) { ma=iMAOnArray(RSI,0,bb_period,0,0,i); // midle stdev=iStdDevOnArray(RSI,0,bb_period,0,0,i); // dev BBUP[i]=ma+bb_dev*stdev; // up BBDOWN[i]=ma-bb_dev*stdev; // down Buff4[i]=0; Buff5[i]=0; } if(limit<Bars-1) limit++; for(i=limit; i>0; i--) { if(PrevSignal >= 0) { if( RSI[i] < BBDOWN[i] && RSI[i+1] < BBUP[i+1] && RSI2[i] < BBDOWN[i] && RSI2

Does ShellExecuteW(…) work only once in MetaTrader 4 or not?

三世轮回 提交于 2019-12-12 01:27:06
问题 Trying to launch an .exe from MQL4 using ShellExecuteW() . Does this command work only once, or not? #import "shell32.dll" // MQL4-syntax-wrapper-Bo[#import]Container // v-------------- caller-side interface to DLL int ShellExecuteW( int hWnd, int lpVerb, string lpFile, int lpParameters, int lpDirectory, int nCmdShow ); #import // MQL4-syntax-wrapper-Eo[#import]Container if ( cond == true ){ ShellExecuteW( 0, "open", "D:\\Execute.exe", "", "", 1 ); } 回答1: A: a short version Maybe yes, maybe

MQL4 Can you get the trade volume from the One Click Panel?

北城余情 提交于 2019-12-11 14:47:08
问题 Does anyone know if and how you can get the trade volume from the One Click Trade panel on the current chart? I'm putting together some quick trade scripts and would be great to pull the current trade volume or lot size from the one click panel. Thanks in advance 回答1: IMHO no The recent 24 months of Metatrader 4 ( re-inventing ) product updates have brought a few teasing elements ( One-Click-Trading[TM] ( OCT ), or Depth-Of-Market ( DOM ), New-MQL4 ( nMQL4 ) ). The bad news, nevertheless, is

How to get price of Chart HLine objects and calculate Fibonacci levels

只愿长相守 提交于 2019-12-11 04:49:07
问题 Three part question: How to find 2 user created horizontal lines on a chart by name and return the price of each. Then determine which HLine was crossed by the price most recently to determine trend direction. Calculate Fibonacci levels based on prices and direction 回答1: Working example of Fibonacci object that can be edited by the user and printing of fibonacci levels. #include <ChartObjects/ChartObjectsFibo.mqh> CChartObjectFibo *Fibo; int OnInit() { Fibo = new CChartObjectFibo(); #Create

How to draw a trend line that joins the highest point of every candle after first hour of day

泪湿孤枕 提交于 2019-12-11 04:16:14
问题 I want to write an EA that joins the highest points of each candle using a trend line (after the first hour of a day). I saw the documentation for the trend line. This is what I've done: ObjectCreate(chart_ID,name,OBJ_TREND,sub_window,time1,price1,time2,price2) ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr); ObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style); ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width); ObjectSetInteger(chart_ID,name,OBJPROP_RAY,false); I know I am suppose to