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

RE: Exit Easy Language Code Help



PureBytes Links

Trading Reference Links

Gaston,

Here is a sample indicator that plots the nearest .4 or .9 below the Low and
the nearest .6 or .1 above the High. I hope this helps you.

It sounds like your premise for this request is that since the S&P tends to
gravitate towards the whole and half numbers, if you are going long, you
don't want your stop hit until you break below .5 or .0, hence the request
for .4 and .9, respectively.

Likewise, if you are going short, you don't want your stop hit until you
break above .5 or .0, hence .6 or .1, respectively.

Am I on the right track with your thinking? Any research you would like to
share with the group or is it just from observation?

Neil


{ *******************************************************************

	Study		: HTC Harrington Price Magnet - Harrington Trading Co. Price Magnet
				  Test indicator. For S&P, Plot nearest .4 or .9 below low and .6 or .1
above high

	Original		: 02/01/2000
	Last Edit		: 02/01/2000

	Created By	: Neil Jon Harrington, Harrington Trading Co.  (c) Copyright
2000, njh@xxxxxxxxx

********************************************************************}

Vars				: IntPart(0), FracPart(0), HiMark(0), LoMark(0);

IntPart			= IntPortion(High);
FracPart			= FracPortion(High);

If FracPart = 0 Then
	HiMark		= IntPart + .1
Else
	If FracPart > .5 Then
		HiMark	= IntPart + 1.1
	Else
		HiMark	= IntPart + .6;

Plot1				(HiMark, "Hi"); { Plot as a  blue point }

IntPart			= IntPortion(Low);
FracPart			= FracPortion(Low);

If FracPart < .5 Then
	LoMark		= IntPart - .1
Else
	LoMark		= IntPart + .4;

Plot2				(LoMark, "Lo");  { Plot as a magenta point }

{**************************************************}


| -----Original Message-----
| From: Gaston Lang [mailto:gastonlang@xxxxxxxxxxxxx]
| Sent: Tuesday, February 01, 2000 1:12 AM
| To: Omega-List
| Subject: Exit Easy Language Code Help
|
|
| Hello Traders
|
| I have EL question for the GURU'S, any help is greatly appreciated.
|
| I am working on a system that fades breakouts and i need some
| help coding my
| stop loss in EL.
| In this system I am buying at the close of a 5 min bar. This bar
| is at least
| a 9 bar low and my stop needs to be below the close by some
| amount. I use a
| percentage of the average true range subtracted from the low of
| the bar that
| I buy on the close. I think I can handle this, what i need is to round the
| number down to the lowest .90 or .40. BTW this is an intraday S&P system.
| Here is an example. Price of 5 min bar closes at 1429.20, the low of that
| bar is 1428.70. My ATR stop is 1.60. 1.60 subtracted from 1428.70 is
| 1427.10. I would like to round 1427.10 to the lower .90 which is 1426.90.
| Can this be coded, I dont know! Any help will be greatly appreciated. If i
| have not explained this well enough, but from what you gathered you think
| you may have a solution, please ask me to try again. Thanks in advance and
| good trading.
|
| Gaston
|