|
例如我想到跳到某一天的bar,現在我要放大再慢慢找,有沒有afl可以幫到我呢?
找到類似的function,就是不知道怎樣用?
procedure ZoomToIndex( FirstBarIndex, LastBarIndex)
{
StaticVarSet("FirstBarIndex",FirstBarIndex);
StaticVarSet("LastBarIndex",LastBarIndex);
DT = DateTime();
BI = BarIndex();
LastDateTime = LastValue(ValueWhen( LastBarIndex == BI, DT ));
FirstDateTime = LastValue(ValueWhen( FirstBarIndex == BI, DT ));
LastDateTimestr = DateTimeToStr( LastDateTime );
FirstDateTimestr = DateTimeToStr( FirstDateTime );
AB = CreateObject("Broker.Application");
AW = AB.ActiveWindow;
AW.ZoomToRange( FirstDateTimestr, LastDateTimestr );
}
|
|