[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Systems Test



PureBytes Links

Trading Reference Links

BTurner838@xxxxxxx wrote:
> 
> Is there a way to make the systems test enter long on a trade only if the
> entrance day trades X amount above the signal day?  I am working on a swing
> trade system and I need this filter to eliminate trades that would not be
> taken.
> 
> Thanks in advance......Blake

Blake,
Something like the following should work. Lets call this Blakes Function

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

TimeLimit:=5;

Trigger:=If(Condition,1,0);

TriggerLevel:ValueWhen(1,Trigger=1,CLOSE);

Enter:=If(BarsSince(Trigger)<=T AND HIGH >TriggerLevel+X,1,0);

Enter;

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

TimeLimit is some number of bars that may pass by before the initial 
trigger signal ceases to be valid.

Trigger is a binary function. It will have a value of 1 whenever your
condition is TRUE. When FALSE, Trigger will have a value of 0.

TriggerLevel is the target price that is used to determine entry. In
this case I have used the CLOSE. This price could be any valid numeric
function.

Enter is also a binary function. Enter is true when the most recent 
Trigger is within the allowed time limit and the HIGH of some bar
exceeds the TriggerLevel plus your X amount.

I hope this helps.

Regards,
Tim