Chiedo se possibile convertire questa strategia da Easylanguage:
***SHORT TERM VOLATILY BASED OPEN RANGE BREAK OUT WITH PATTERN RECOGNITION***
vars: atr(0), longLiqPt(0), shortLiqPt(999999), protLongStop(0), protShortStop(0), lowestClose4(0), highestClose4(0), bed(0), sed(0), stb(0), sts(0), canTrade(0);
atr = avgtruerange(30);
lowestClose4 = lowest(close, 4);
highestClose4 = highest(close, 4);
canTrade = 0;
if(highestClose4 – lowestClose 4<atr)then canTrade=1
stb= open of tomorrow + .62*truerange;
sts= open of tomorrow – .62*truerange;
if (canTrade = 1 and entriestoday(date)=0) then
begin
buy(“pattbuy”) tomorrow at stb stop;
sell (“pattsell”) tomorrow at sts stop;
end;
if (canTrade=0) then
begin
exitlong (“longliq”) at sts stop;
exitshort (“shrtliq”) at stb stop;
end;