I need to code something like that but I dont know the right syntax in the second structure to have fields containing address to structure of
first type.
Thanks
Janfi
struct ConditionSet
{
int CondsNbr; // Nombre de conditions dans le setbool TabConds [MaxConditions];
string TabCondsLabel [MaxConditions];
int CandleNum [MaxConditions];
bool ExitCondition;
int int1, int2, int3, int4, int5; // user integersdouble d1, d2, d3,d4, d5; // user doubles
};
struct Transaction
{
string Strategie_name;
stringSymbol;
bool BuyReady;
bool SellReady;
bool BuyRunning;
bool SellRunning;
ConditionSet & conditionsAchat; // HERE THIS IS NOT THE CORRECT SYNTAXE
ConditionSet & conditionsVente; // HERE THIS IS NOT THE CORRECT SYNTAXEint ticketAchat;
int ticketVente;
};
ok, thank you William, I did found another solution with arrays for ConditionSet ( 1 for buy 1 for sell ) and the array index instead of pointers
in Transaction .
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello everybody,
I need to code something like that but I dont know the right syntax in the second structure to have fields containing address to structure of first type.
Thanks
Janfi