Forum

Twilio causes MT4 crash

I am trying to connect Metatrader4 with Twilio (voice and messaging service), via DLL. The call goes something like this: MT4 expert script -> C++/CLI DLL -> C# DLL -> Twilio I have successfully tested both dlls using a (C#) console application - the program calls my mobile successfully. However

CArray and Clear function

The documentation for the Clear function states: " Deletes all of the array elements without memory release." So does that mean I will get memory leaks using this function? I am actually using CArrayDouble, derived from CArray. Thank you

Union reserved word missing???

According to https://docs.mql4.com/basis/types/classes union is a reserved word. However, when I try to use it, the compiler doesnt recognise it. I have build 1090

ChartOpen does not return chart id

This is on MQL4. According to documentation, ChartOpen should return the new chart id . It doesnt. Therefore its a bug. Try this code in OnInit(): long newChartID; long curChartID; curChartID = ChartID (); Print ( "Current chart id: " , curChartID, ", Current chart symbol: "

struct member undefined error

I get this error on the following code: class ConstantBar : public CObject { private : ConstantBar( int pCBType, int pRange, int pArraySize, double pStartAt) : nPoint( 1 ) { ... }; ConstantBar( int pCBType, int pRange, int pArraySize

ChartOpen not returning long ChartID?

Hello ‌In th‌e init section of an EA Im successfully opening a chart of a different timeframe. (The chart opens). However, ChartOpen is not returning the chart id, which according to this it should. Instead it returns 0, and printing GetLastError says "internal error"‌ After opening the chart I want

FileOpenHistory and strategy tester

Is there any way around this? As you know (or maybe not), trying to backtest an EA that uses the function FileOpenHistory generates the error: "function is not allowed in test mode "

Indicator display different in strategy tester visual mode

Hello I have this indicator: int OnCalculate ( const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double

Custom Indicator. Tester vs Live chart. Different values

Hello I feel sure that there is an answer in a post somewhere to my problem - but I cannot find it despite a search. Basically a custom indicator displays different values for one of the indicator lines (thick line, purple/Plum) when dropped onto StrategyTester in visual mode. The indicator line is

Array of arrays access

Hello I have an array of arrays of ints. I want to access a particular sub-array but compiler says: "Invalid array access ". What am I doing wrong? Please Note: I do NOT want to access individual elements of the sub-array int pattern[2][2] = {{-1,1},{1,-1}}; .... int lTarget[] =