Code: Select all
[code]condition1=var5<tresh and var5[1]<tresh and var5[2]<tresh and var5[3]<tresh and var5[4]<tresh;
if condition1 then begin
//if it goes close to the upper bollinger band then sell short
if price crosses above var3 then
sellshort ("slopeMASE") next bar at market;
end;
setstoploss(30);
I have tried putting the stoploss within the conditional statement, but the problem persists. I am uploading a screen shot of what typically happens. . The screen shot is for a buy order but a sellshort order does the same thing. Any suggestions would be appreciated.
Thanks
Leo