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

Re : EL help



PureBytes Links

Trading Reference Links

Dans un courrier daté du 20/08/98 04:29:17  , vous avez écrit :

<< 
 Need some EL help.  I am trying to optimize a simple system that buys on the
 close and sells on the open.  However, I want to only buy closes that are in
 the top part of the trading range.  I am not sure what the percentage of
range
 that is.  So far I have this as the system:
 
 Input:Percent(1)
 
 If Close>(Low+(Range*Percent))
 
 Then Buy Close;
 
 ExitLong Open;
 
 Guess what?  Not working!  Can someone tweak this for me.  Thanks
 
 Pert >>

Fortunately, it will not work:

Range= H-L of the completed bar.
So, the buy statement will be the same than:

If Close>(Low+(Range*Percent))then Buy Close;
<==>
If Close>(Low+((High-Low)*Percent)) then Buy Close;
As percent=1:
<==>
If Close>High then Buy Close;

That is impossible (close could be equal to High, never more).

Maybe what you wanted to write was: 
 If Close>(Low+(Range[1]*Percent)) Then Buy Close;
  ExitLong Open;

This can make sense as the range of the previous bar may be less than current
range, therefore triggering the entry in this case, vene with percent=1.

Sincerely,

Pierre Orphelin
www.sirtrade.com