VWAP(売買高加重平均価格)でなくとも、すごくシンプルな方法で、一日の最初のバーからスタートの移動平均線の表示インディケーターを開発いたしました。
{*******************************************************************
Description : This Indicator plots Moving Average 1 Line Indicator Intraday
Provided By : ●●●●
********************************************************************}
Inputs: Price(Close), Length(9), Displace(0);
Vars: Counter(0);
If Displace >= 0 OR CurrentBar > AbsValue(Displace) Then Begin
If Date[1]<>Date Then Counter = 0;
Counter = Counter + 1;
Counter = Minlist(Counter, Length);
Plot1[Displace](Average(Price, Counter), “SimpAvg1”);
{Alert Criteria}
IF Price < Plot1 AND Plot1 < Plot1[1] AND Plot1[1] > Plot1[2] Then
Alert(“The Moving Average has just changed direction and is now bullish”)
Else
If Price > Plot1 AND Plot1 > Plot1[1] AND Plot1[1] < Plot1[2] Then
Alert(“The Moving Average has just changed direction and is now bearish”);
{Moving Average Commentary}
#BeginCmtry
Commentary(ExpertAvg1Line(Price, Length, Displace, Plot1));
#End;
End;
コメントを残す