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

Stop as %retracement of a swing.



PureBytes Links

Trading Reference Links

Subj:	 ATI_Stop as a $ Retracement of Swing.
Date:	98-05-29 20:11:54 EDT
From:	Detomps@xxxxxxx
To:	ati@xxxxxxxxxx

Hi All,

Has anyone on this list ever come across some TS code that does the 
following on intraday bars :

Imagine a buy being made near a swing low. Perhaps on the second day of
the
start of the up move.  The program will assume  that it is a significant
low.

A position is taken on this second day. 

A protective stop is placed a couple of ticks above the low of the start
of
the assumed swing.

A second money management stop in ts looks for the following on an
intraday
basis: 

It assumes the Swing low.  As time progresses.. say 4 days, a
high is made.  The money management stop finds the high and the user
places
within the money management stop the order to sell if the low hits 35%
retracement of the identified swing low and swing high...When the low
hits
this order the program alerts the user with a sell order or in testing
sells
the contract/s.

If no one has seen such code.  Am I correct that I have to program into
this function  a
loop function in a manner that dynamically counts the bars from the low
of the
swing to the current bar being analyzed in order to calculate the length
of the
swing?

Secondly, How does one check for objective stops, in the context of such
a function, which 
takes out a few of the contracts?  For instance, at the time of the
initiation of the long position 5 contracts were purchased.. Would one
place a statement with in the loop that if such and such objective is
reached on the third day sell two contracts??

I think my ignorance of what ts does during a loop and the process of
analyzing the 
data is my hang up.  I know it seems obviouse but Does TS/SC run the
entire function
or a program on a single bar?  If all conditions remain the same, then
does it go to the next bar.

Appreciatively,

Don Thompson

Don Thompson.