|
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Terry Sent: Friday, July 28, 2006 9:43 AM To: [email protected] Subject: RE: [amibroker] Interpreting A Code Segment This is doing a RelStrength of each stock in the WatchList to the currently selected ticker. It is then doing the Guppy MMA against the resulting RelStrength. What it does next is not shown in the code posted. (Note: It is skipping comparing the current ticker to itself if that ticker is also in Watchlist, if(sym != Name()), because you'd just get all 1's.) So, this code is dependent on the selected ticker for consistent results, depending on what the follow-on code does.
Thanks for the explanation...I should have posted the full code which I have done so below. I read the help definition, and guess that I am puzzled over the entire concept of the code. This code combines relstrength with Guppy MMAs and is supposed to rank the stocks by their RS compared to the MMAs. Somehow it is eluding me but I will keep studying and experimenting with it. Here is the full code...maybe someone can explain it all more fully and get some use out of it. Ken Code follows (not my code, obviously) /* I do this for every symbol in the watchlist except the
index being scanned, then I generally This is intended only for sector rotation, and probably
would not be terribly useful as a trading EnableRotationalTrading(); function CalculatePosition(st, Lt1, Lt2, Lt3, Lt4, Lt5,
Lt6) if(st > Lt1) score++;
st3 = EMA(f, 3); Lt30 = EMA(f, 30); z=BarCount - 1; PositionScore[z] = PositionScore[z] + CalculatePosition(st3[z], Lt30[z], Lt35[z], Lt40[z], Lt45[z], Lt50[z], Lt60[z]); PositionScore[z] = PositionScore[z] + CalculatePosition(st5[z], Lt30[z], Lt35[z], Lt40[z], Lt45[z], Lt50[z], Lt60[z]); PositionScore[z] = PositionScore[z] + CalculatePosition(st8[z], Lt30[z], Lt35[z], Lt40[z], Lt45[z], Lt50[z], Lt60[z]); PositionScore[z] = PositionScore[z] + CalculatePosition(st12[z], Lt30[z], Lt35[z], Lt40[z], Lt45[z], Lt50[z], Lt60[z]); PositionScore[z] = PositionScore[z] + CalculatePosition(st15[z], Lt30[z], Lt35[z], Lt40[z], Lt45[z], Lt50[z], Lt60[z]); } AddTextColumn(FullName(), "Name"); 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 other support material please check also: http://www.amibroker.com/support.html
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |
- RE: [amibroker] Interpreting A Code Segment Terry
- [amibroker] Interpreting A Code Segment--With Full Code Ken Close
