- You can't use floating point numbers in enumerators. Enumerators are integer only.
- The last element of an enumerator should not have an "," at the end
- Always compile with "#property strict" to force you to always write well structured code.
-
Always post all relevant code (using Code button) or attach the file.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problemWe have no idea what a trades is. What GetNodeAtIndex() returns.
-
struct trade { int ticketNumber; double stopLossLevel; truefalse isTrailing; fiblevels breakevenPoint; bool hasHitBreakeven; double distanceInPrice; double tp1; double closeAtTp; };
Always declare largest to the smallest data types in order to minimize struct size. (Doubles/Datetimes/Strings, int/enumerations, bool last.)
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 have a CList which holds trade objects (structs)
My struct looks like this:
truefalse is an enumerator
and so is fiblevels
I iterate through this list of structs using
but I am getting a compiler error saying Struct member undefined
I thought runtime polymorphism existed in MQL4 but am I wrong? Or have I went wrong somewhere here. Thanks