PureBytes Links
Trading Reference Links
|
--- In amibroker@xxxxxxxxxxxxxxx, Ken Close <ken45140@xxx> wrote:
>
> You said: "thanks for replying to my question - too bad you
couldn't give
> me the answer."
>
> LOL. You will have a hard time using all of the power of AFL with an
> attitude like that.
>
> Your question: "If someone can explain to me the right solution"
>
> The code I pasted in is the solution. The explanation is that the SAR
> indicator is hard coded into the AB internal program; you can not
change it.
> It operates only on the Close price.
>
> If you want to use SAR against any other variable you have to use
the code
> pasted in here. SAR is very complex and this is a way to do it;
probably
> the only way but maybe someone else can speak up and give you a more
simple
> solution.
>
> Good luck. Ha!
>
Well i am new here and i joined this group to seek help so i don't
want to argue with anybody.
i just want to make the remark that your reply was just a simple copy
and paste from the link i gave on my post ... (maybe the reason why i
gave that link could be that i already knew that the answer is to make
the right code change inside that code ? And maybe the reason why i
asked some help here is that i could'nt find myself the right code
portion to change ?)
Anyway thanks again.
Back to my question :
>From that original code
(http://www.amibroker.com/library/detail.php?id=268 )
i am trying to set the SAR indicator to compute from an EMA(close,5)
for instance instead of the classical close
After more research it <<seems>> that the code to change could be :
original :
....
hp = High [ 0 ];
lp = Low [ 0 ];
.....
psar [ i ] = psar [ i-1 ] + af * ( hp - psar [ i-1 ]);
.....
psar [ i ] = psar [ i-1 ] + af * ( lp - psar [ i-1 ]);
.....
changed :
hp = EMA(High [ 0 ],5);
lp = EMA(Low [ 0 ],5);
But with that change i get the error 8 - type mismatch
Could someone give me a clue for solving that problem ?
Any helpful answer would be welcome
Thanks
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|