Tipster Trendlines UPDATE HERE
Go to the Tipster Trendlines 2.1 post for additional information on how to obtain this AFL code. Don't make any more manual entry mistakes!
In addition, you may want to check the "Tipster Trendlines" TAGS on the the right of the blog to see all post about this code (or click this link).
Another update to the AFL, Tipster Trendlines, for trading right from the Amibroker chart. Here are the two additions;
Description (code follows below)
1. This addition will add "seconds remaining in bar" to the title of the chart. Good for intraday trading.
2. This addition will tell you if the last daily bar has the same date as today. Have you ever downloaded your EOD data and placed orders based on old data, assuming that you have the latest quotes? This won't prevent that but it will show a warning in the title of the chart so you have a chance!AFL CODE
Put this code at the top of the AFL, right after SetChartOptions(0,chartShowArrowschartShowDateschartWrapTitle); function secondsLeftOnBar_func()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
TimeFrame = Interval();
Newperiod = SecondNum % TimeFrame == 0;
SecsLeft = SecondNum - int( SecondNum / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;
return SecsToGo;
}
Replace the Ttle section at the bottom with this code
//Check if daily data is from today
DownloadDate = LastValue(DateNum());
TodayDate = Now(3);
if(LastValue(DownloadDate) != TodayDate)
BarDateError = " *WARNING: Data NOT Current*";
else
BarDateError ="";
Title = EncodeColor(colorLightBlue) + Name() + " " + FullName() +
EncodeColor(colorLightBlue) + " - " + Date() +
EncodeColor(colorBlue) + " O=" + O +
EncodeColor(colorLime) + " H=" + H +
EncodeColor(colorRed) +" L=" + L +
EncodeColor(colorBlue) + " C=" + C +
EncodeColor(colorYellow) + " ATR: " + Prec(ATR(6),4) +
EncodeColor(colorDarkYellow) + " Seconds Remaining: " + secondsLeftOnBar_func() +
EncodeColor(colorWhite) + BarDateError;
_SECTION_END();
Enjoy!
Wednesday, August 5, 2009
Tipster Trendlines 2.12
Subscribe to:
Post Comments (Atom)
Disclaimer
The information presented on this site is for educational and entertainment purposes only. This site contains no suggestions or instructions that you must follow, do your own research and due diligence before committing your cash to the markets. Your on your own.
No comments:
Post a Comment
Let's hear what you have to say!