Traders Laboratory - View Single Post - Easylanguage and Script Help
View Single Post
  #50 (permalink)  
Old 04-15-2008, 07:37 AM
Blu-Ray's Avatar
Blu-Ray Blu-Ray is offline
Blu-Ray is or is not online

Trader Specs
 
Join Date: Nov 2006
Location: England
Posts: 401
Thanks: 92
Thanked 34 Times in 22 Posts
Re: Easylanguage and Script Help

Darknite

Give this a try:

Inputs:
ProfTarget(30),StopLoss(2 ),endtime(2000);

Vars:
ShortEntry(0), Permission(0), Mintick(0), mystop(0), MP(0);

MP = marketposition;
Mintick = minmove/pricescale;

Condition1 = C[1] data3 >C[2] data3 and H data3 > H [1]data3 and H data3 > H[2] data3 and C data3 < O data3;

if condition1 and MP = 0 and time < endtime and permission = 0 then begin
ShortEntry = Low of data2 - (1*mintick);
mystop = High of data2 + (Stoploss*mintick);
permission = 1;
end;

if permission = 1 and mro(mp=-1,7,1) = -1 then begin
SellShort next bar at ShortEntry Stop;
Permission = 2;
end;

if permission = 2 and mod(t,100)=0 and mp <> 0 then permission = 2;
if permission = 2 and mod(t,100)=0 and mp = 0 then permission = 0;

if mp = -1 then begin
buytocover ("StoppedOut") next bar at mystop stop;
end;

if mp = -1 and time > endtime then setexitonclose;

setprofittarget( ProfTarget );


Cheers

Blu-Ray

__________________
Remember - Take the path of least resistance.
Reply With Quote