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

Re: [amibroker] Damage Control, StopCalcs



PureBytes Links

Trading Reference Links

Regarding this subject of entering Stops as a protective device, I herewith attach a simple little AFL, which when loaded in the "Commentary Window" containing the stop calculation YOU desire, will automatically display stop values for the ticker you are viewing in AmiBroker. The window is "Always On Top", so as you flip through your charts, the values are automatically calculated FOR THE TICKER BEING VIEWED. It's very handy when you're on-line at your broker page and want to enter your stop limits.

In this example, AB calculates four stop values of: -2% below the latest days' low, -3% below the low, -5% below the low and -5% below the average of the lows of the last three data days. I find the latter value of interest when a rising ticker is flattening and I want to give it a bit more leeway. 

Writing another line for the value you desire is simple. The file titled StopCalcs.afl is attached, ready for you to drop it into your AFL folder. The details of the file contents follow: 

"Current -2% stop level on todays Low " + WriteVal ( 0.98 * Low );

"Current -3% stop level on todays Low " + WriteVal ( 0.97 * Low );

"Current -5% stop level on todays Low " + WriteVal ( 0.95 * Low );

"Current -5% stop below last 3 days is " + WriteVal( 0.95 * ( LLV (Low,3 ))); 

One last comment. THIS IS A GREAT LIST FOR A GREAT PROGRAM! Thanks Tomasz!

One mans opinion of course.

Hal

--=====================_11112068==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<font size=3>Hi All, <br>
<br>
Regarding this subject of entering Stops as a protective device, I
herewith attach a simple little AFL, which when loaded&nbsp; in the
&quot;Commentary Window&quot; containing the stop calculation YOU desire,
will automatically display stop values for the ticker you are viewing in
AmiBroker. The window is &quot;Always On Top&quot;, so as you flip
through your charts, the values are automatically calculated FOR THE
TICKER BEING VIEWED. It's very handy when you're on-line at your broker
page and want to enter your stop limits.<br>
<br>
In this example, AB calculates&nbsp; four stop values of: -2% below the
latest days' low, -3% below the low, -5% below the low and -5% below the
average of the lows of the last three data days. I find the latter value
of interest when a&nbsp; rising ticker is flattening and I want to give
it a bit more leeway. <br>
<br>
Writing another line for the value you desire is simple. The file titled
StopCalcs.afl is attached, ready for you to drop it into your AFL
folder.&nbsp; The details of the file contents follow: <br>
<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&quot;Current
-2% stop level on todays Low &quot; + WriteVal ( 0.98 * Low );<br>
<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&quot;Current
-3% stop level on todays Low &quot; + WriteVal ( 0.97 * Low );<br>
<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&quot;Current
-5% stop level on todays Low &quot; + WriteVal ( 0.95 * Low );<br>
<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>&quot;Current
-5% stop below last 3 days is &quot; + WriteVal( 0.95 * ( LLV (Low,3 )));
<br>
<br>
One last comment. THIS IS A GREAT LIST FOR A GREAT PROGRAM! Thanks
Tomasz!<br>
<br>
One mans opinion of course.<br>
<br>
Hal<br>
</font></html>

--=====================_11112068==_.ALT--

"Current -3% stop level on todays Low " + WriteVal ( 0.97 * Low );

"Current -5% stop level on todays Low " + WriteVal ( 0.95 * Low );

"Current -5% stop below last 3 days is " + WriteVal( 0.95 * ( LLV (Low,3 )));