Without seeing your full code it's hard to tell you what is causing . . . . " ExistPositions - expression on global scope not allowed " if you don't want to post your full code then don't, but you will get more accurate advice if we can see the problem instead of guessing, and that means less work for everyone.
for(shift=Bars-1; shift>=0; shift--) // <----- this loop does nothing at all ! !double ZigZagHigh=iCustom(NULL,0,"ZigZag",MODE_HIGH,0);
double ZigZagLow=iCustom(NULL,0,"ZigZag",MODE_LOW,0);
double LowestBar=Low[Lowest(NULL,0,MODE_LOW,ExtDepth,sh
. . .
bool a=false, b=false; // Note: b is a bool . . .int shift, BlueArrowIndex, RedArrowIndex, Index = 0;
double zag, zig; b=0;
while(a<2)
{
if(zig>0) zag=zig;
zig=iCustom(NULL, 0, "ZigZag", 0, b);
if(zig>0) a+=1;
b++; // how can you increment a bool ??
. . .
if(AccountFreeMargin()<(SafetyPercent/100)*AccountBalance())
{
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
}
} // <----- this is the closing brace of start()if (!ExistPositions()){ // <----- so this give this error 'ExistPositions' - expression on global scope not allowedif(diClose0<diMA1 && (ZigZagLow) )
{
OpenBuy();
return(0);
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.
i can post,
but please help me to finish my project.
ok ?
my project just a MA program, and trying to add zigzag into it.
i can post,
but please help me to finish my project.
ok ?
i can post,
but please help me to finish my project.
ok ?
so far i backtest from year 1970 till today,
the result is burned account.
OK . . . some comments . . .
. . .
. . .
Put this one step up
i trying to modify escape ea.
so i just use all the code inside it.
i trying to modify escape ea.
so i just use all the code inside it.