Again, I am sorry for bothering, but for most of you easy question.
Following works fine in Lite-C:
while(algo(loop("TRND"))) //,"ALGO2","ALGO3","ALGO4")))
{
NumComponents = NumLoops1*NumLoops2;
algoSetup();
equityCurve();
switch(Algo) {
case "TRND": tradeTRND(); break;
//case "ALGO2": tradeCNTR(); break;
//case "ALGO3": tradeALGO3(); break;
//case "ALGO4": tradeALGO4(); break;
// add more algos here
}
Cause of my lack of knowledge, changing the code I have to C / C++ (dll) I get some errors on compilation in the complete context.
Those I solved, but, the case / switch wants an enumeration.
Don't get it peroper to be accepted by the compiler.
So changed to "if else"
if (0 == strcmp(Algo, "TRND"))
tradeTRND();
else if (0 == strcmp(Algo, "CNTR"))
tradeCNTR();
compiles without errors, just doesn't seem to be correct...
Any advice?