lex2pb: My challenge is that the Initialise() method needs to reference properties in the previous CEvent in the same array and this is not accessible unless I pass a reference to the array.
Pass what is required, only what is required. The array is not required. Ask TArrayPtr for the previous element and pass that as a reference.
whroeder1:
Pass what is required, only what is required. The array is not required. Ask TArrayPtr for the previous element and pass that as a reference.
Pass what is required, only what is required. The array is not required. Ask TArrayPtr for the previous element and pass that as a reference.
I had rules out passing the pointer to the previous element as the class library does not know which Array it was working with. However as you have correctly pointed out - that does not actually matter ;~)
Thanks you for taking the time to respond. I will keep you in the loop on the results of the bot ;) Initial forward results are very promising.
Thx, Lex

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
I am a self taught mql4 hack needing a bit of assistance to get a complex (to me anyway) data type defined - and have been trying for several nights. A bit of help would be greatly appreciated. I am writing an EA to apply a trading methodology that uses a combination of M1, M5 and M15 time frames. The EA is written for M1 charts - but keeps tabs on what the indicators in M5 and M15 charts would look like. Each time frame is represented in a Dynamic Array of Pointers to Class objects (CEvents).
CEvents *ptr = new CEvents(); // create the class object,
M1PtrArray.Append(ptr); // Append this to the correct array (could be any combination of M1, M5 and M15)
My challenge is that the Initialise() method needs to reference properties in the previous CEvent in the same array and this is not accessible unless I pass a reference to the array. I am struggling to correct define this ...? A bit beyond my depth.
Would greatly appreciate the insight I am missing.
Have attached a minimal version with the issues exposed (does not compile) .
Thank you in advance,
Lex