I am trying to optimize over diffeent types of systems and I need to
define function accordingly, but I get and error with this code
if (sys==1){
///cc->co entry at close exit at day after open
SetOption("ActivateStopsImmediately",True);
SetTradeDelays(0,0,0,0);
ShortPrice=C;
BuyPrice=C;
CoverPrice=O;
SellPrice=O;
function P1f() {return Ref(C,-1);}
function P2f() {return Ref(C,0);}
ApplyStop(stopTypeNBar,stopModeBars,1,1);
dc=1;
MaxPosPer=1;
}
while outside brackets it runs.
In a similar way variable I noticed that arrays declared at different
scope levels are not accessible to the lower levels (i think scalr
yes) unless they are defined at gloabal level,
This is different from c++ scope conventions.
So the only way to share among different scopes (I mean portions of
code at differnt levels of {} nesting), seems to declare them globally.
Am I correct?
Thanks
Ly