|
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.
|