View Single Post
  #34 (permalink)  
Old 12-25-2008, 04:25 AM
darvasboxes darvasboxes is offline
Junior Member
 
Join Date: Dec 2008
Posts: 6
darvasboxes is on a distinguished road
Help on converting this Easy Language Code into Metatrader

Anyone can help??

vars: atr(0),longLiqPt(0),shortLiqPt(9999 99),protLongStop(0),protShortStop(0 ),lowestClose4(0),highestClose4(0), bed(0),sed(0),stb(0),sts(0),canTrad e(0);

atr = avgtruerange(24);
lowestClose4 = lowest(close,4);
highestClose4 = highest(close,4);

canTrade = 0;
if(highestClose4 - lowestClose4 < atr) then canTrade = 1;

stb = open of tomorrow + .5*truerange;
sts = open of tomorrow - .5*truerange;

If(canTrade = 1 and entriesttoday(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;


Many thanks!!
Reply With Quote