Traders Laboratory - View Single Post - Easylanguage and Script Help
View Single Post
  #9 (permalink)  
Old 03-26-2008, 06:39 PM
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

It would depend on your particular entry and stoploss criteria, Here's a strategy code I've done, but I've based it on entry 1 tick below the low of the reversal bar, with the stoploss being x amount of ticks above the high of the reversal bar ( I've made that section as an input, so you can decide ).

Inputs:
ProfTarget(30),StopLoss(1 ); { These inputs are in number of ticks }

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

MP = marketposition;
Mintick = minmove/pricescale;


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


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

if permission = 1 then begin
SellShort next bar at ShortEntry Stop;
Permission = 0;
end;

if mp = -1 then begin
buytocover ("ProfitTarget") next bar at ShortEntry - (ProfTarget*mintick) limit;
buytocover ("StoppedOut") next bar at mystop stop;
end;


If you have exact entry and exit criteria different from above, just let me know and I'll amend it for you.

Hope this helps

Blu-Ray

__________________
Remember - Take the path of least resistance.
Reply With Quote
The Following User Says Thank You to Blu-Ray For This Useful Post:
thrunner (03-27-2008)