⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 time frame weekly bars.afl

📁 一个更精度的平滑涵数, 可用于股票交易系统.用于Amibroker 平台
💻 AFL
字号:
//------------------------------------------------------------------------------
//
//  Formula Name:    Time Frame Weekly Bars
//  Author/Uploader: Anthony Faragasso 
//  E-mail:          ajf1111@epix.net
//  Date/Time Added: 2002-09-21 19:57:33
//  Origin:          
//  Keywords:        
//  Level:           medium
//  Flags:           indicator
//  Formula URL:     http://www.amibroker.com/library/formula.php?id=223
//  Details URL:     http://www.amibroker.com/library/detail.php?id=223
//
//------------------------------------------------------------------------------
//
//  WEEKLY PRICE ARRAY : The close is the close of the last day of the week:
//
//  (WeeklyClose) The open is the open of the first day of the week:
//  (WeeklyOpen) The high is
//
//  the highest high of the week : (WeeklyHigh) The low is the lowest low of
//  the week :
//
//  (WeeklyLow ) The volume is the sum of the volume for the Week.
//
//------------------------------------------------------------------------------

//Time Frame Weekly Bars
//Coded by Anthony Faragasso
//Ver. 1.01, Update#1
//Credit to Tomasz for some Help 

weekstart = DayOfWeek() < Ref( DayOfWeek(), -1 );
weekend = DayOfWeek() > Ref( DayOfWeek(),1);

/**Establish weekly Price Arrays**/
WeeklyOpen=ValueWhen(DayOfWeek()< Ref(DayOfWeek(),-1) ,Open);
WeeklyHigh = ValueWhen( weekend, HighestSince( weekstart, High ) );
WeeklyLow = ValueWhen( weekend, LowestSince( weekstart, Low ) );
WeeklyClose=ValueWhen(DayOfWeek() > Ref( DayOfWeek(),1),Close);
WeeklyVolume=ValueWhen(DayOfWeek() > Ref(DayOfWeek(),1),Sum(V,5));
Plot(WEEKLYHIGH,"WkHIGH",colorRed,styleLine);
Plot(WEEKLYLOW,"WkLOW",colorGreen,styleLine);
Plot(WEEKLYOPEN,"WkOPEN",colorBlue,styleLine);
Plot(WEEKLYCLOSE,"WkCLOSE",colorYellow,styleLine);
Plot(Close,"CLOSE",colorBlack,styleCandle);
//Plot(weeklyvolume,"WkVOL",colorOrange,styleLine);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -