日中移動平均線

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;

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

ABOUTこの記事をかいた人

当サイトは、システムトレードに関する専門的な知識、技術、経験を皆様と共有することで、真剣なトレーダーの方々にインスピレーション(アイデアの源泉)の供給をいたします。トレーダーの競争力強化に焦点をあて、トレーディングシステムの構築を目的としてその普及に貢献します。 詳細は「概要とサービス内容」をご覧下さい。 ご要望はこちらで承ります。