harryma23 / Profile
Friends
Requests
Add friends via their profile or user search and you will be able to see if they are online
Outgoing
harryma23
Added topic return with or without parentheses
According to https://www.mql5.com/en/docs/basis/operators/return,  ; we should enclose the value or expression to be returned in parentheses, for example: int CalcSum( int x, int y) { return (x+y); } But
harryma23
Added topic Is an intermediate array with INDICATOR_CALCULATIONS required?
I've created an indicator that calls an internal function. This function uses an array internally for intermediate calculations . So far, everything works. The indicator is displayed in the indicator chart. However, I'm wondering if I should define
harryma23
Added topic CExpert:Init : adjust period and symbol
According to the CExpert class (of StandardLib), we must always use the current symbol (_Symbol) or period (_Period): // See line 240 //+------------------------------------------------------------------+ //| Initialization and
harryma23
Added topic passing index to CopyBuffer/GetData
I have an array-based index (i.e., the index comes not from a time series based array). Now I want to use this index : double high[]; m_high.GetData( index , numberOfBars, high); // Method from Indicator.GetData() with calls common
harryma23
Added topic ArrayResize needed when using dynamic array with CopyBuffer?
According to https://www.mql5.com/en/docs/series/copybuffer , we can simple use double indicatorArr[]; CopyBuffer (m_indicator.Handle(), 0 , 0 , 10 , indicatorArr); // puts the latest 10 indicator values into array But why do I see many examples
harryma23
Added topic Refresh() with GetData() and CopyBuffer()
According to https://www.mql5.com/en/docs/standardlibrary/technicalindicators/cindicators/cindicator/cindicatorrefresh, it is recommended to always call Refresh() when retrieving data with GetData(). However, looking at the standard lib code (e.g
harryma23
Added topic check pointer by "!"
Is this if (pointerObj == NULL || CheckPointer (pointerObj)== POINTER_INVALID ){..} the same as this: if (!pointerObj){..} As it is said in https://www.mql5.com/en/docs/basis/types/object_pointers ; > To quickly validate the pointer
harryma23
Added topic Missing compiler error for undefined struct methods
I have something like this, which works as usual: struct TradeSettings{ string msg; void
harryma23
Added topic CustomIndicator.Create: second param with INT does not work..
I have a custom indicator with the following inputs (in the following order): input int period = 10 ; // first position in the indicator settings input bool Bold = true ; // second position in the indicator settings and register the
harryma23
Added topic CExpertSignal: get signal results from specified bar index
How can I test or use classes derived from CExpertSignal without using the StrategyTester? For example, I have CSignalMA (a child from CExpertSignal, located in Expert/Signal) . I want to have something like this: 1. go to the last 200 bars 2
harryma23
Added topic Can I intialize CExpert in OnTimer or OnTick instead of OnInit ?
I use CExpert and initialize the constructors in int OnInit() : int OnInit () { if (!myExpert.Init( Symbol (), Period (),ExpertEveryTick,ExpertMagicNumber)) {
harryma23
Added topic Extend CTrade or CSignal only for comment/color?
In MQL4, OrderSend() has a color parameter (see https://docs.mql4.com/trading/ordersend ). Since I'm using MQL5 with the CExpert class, I added the standard CTrade class to the CExpert instance. CTrade has an OrderOpen() function, which unfortunately
harryma23
Added topic How to load indicators in mqproj?
I have a mqproject (consisting of a MyEa.mq5 and a .mqproj file within the folder called "custom") and would like to use indicators from MQL5/Indicators/Examples in my EA. With a simple EA without embedding it in a .mqproj , indicators can be
: