PureBytes Links
Trading Reference Links
|
Roy
Although I do not post much, my knowledge of MetaStock programming is fairly
extensive. I would love to see you do it.
I have Wilder's book here. It was written for the days of handwritten charts
and I am amazed at his book.
Roy, there were several problems as I recall:
1. Initialization. I am not always in a trade in a particular security. As I
recall, I used either the HHV or LLV (depending on long or short) for 2
days.
2. I was unable to program the rules for B & C in the MetaStock formula
language because of the lack of global variables and the lack of a simple
If-Then statement instead of the If-Then-Else.
My very best wishes. Let me know how you do or if there is anything I can do
to help.
neo
_____________________________________________
Wilder's SAR
FORMULA
SAR[tomorrow]=SAR[today] + AF * (EP[trade]-SAR[today]
DEFINITIONS
SIP=the extreme price point while in the previous trade
AF=begins at .02 and is increased (depending on the rules below) by .02 per
day until .20
AF is never increased beyond .20
EP[trade]=Extreme Price Point for the trade made so far
If long, the extreme high price for the trade
If short, the extreme low price for the trade
RULES
ENTRY
A position is entered when a price penetrates the SAR
STOP AND REVERSE (SAR)
A. For the first day of entry, the SAR is the previous SIP
1. If long, the lowest price while in the previous short trade
2. If short, the highest price while in the previous long trade
B. For the second day and thereafter
1. Long - use the formula above but only increase the AF on days when a new
high for the trade is made
2. Short - use the formula above but only increase the AF on days when a
new low for the trade is made
C. Never move the SAR into the previous day's or today's range.
1. Long - never move the SAR for tomorrow above the previous day's or
today's low. If the SAR is above then use the lower low between today and
the previous day as the new SAR. Make the next day's calculations based on
this SAR.
1. Short - never move the SAR for tomorrow below the previous day's or
today's high. If the SAR is above then use the higher high between today and
the previous day as the new SAR. Make the next day's calculations based on
this SAR.
____________________________________________
Neo
> I have found it impossible to properly program the SAR as described by
> Wilder with MetaStock's formula language. I can in Excel. I believe the MS
> indicator is not programmed properly.
Could you possibly post the text for the SAR composition so I can take a
look?
Thanks
Roy
|