マルチタイムフレーム・インディケーター - ページ 898

 

ムラデンさん、もしくはMrtoolsさん、このインジケーターにアラートを出してもらえませんか?ゼロクロスや色の変化で?

よろしくお願いします。

Jozy

 

ツールさん、mladenさん、こんにちは。

これをMTFにし、ゼロクロスを警告していただけないでしょうか?

ありがとうございます。

ファイル:
i-g-cci2.mq4  4 kb
 
Jozy:
Mladenさん、もしくはMrtoolsさん、このインジケーターのアラートをお願いできますか?ゼロクロスや色の変化で?

感謝

Jozy

Jozyさん、インジケーターの投稿を忘れているようです。

 
mladen:
TSDにアクセスすると、すでに自動的に最新スレッド(投稿が新しいスレッド)が表示されているのではないでしょうか?

すみません。私は自分自身を明確に表現していなかったと思います。私はforex-tsd.comのページには行かないのですが、この「multiple-timeframe-indicators」のように興味のあるスレッドのブックマークをいくつか保存していて、このブックマークのURLをクリックすると、ブックマークを保存した時のページではなくこのスレッドの最後のページを自動的に開くように調整する方法を誰か知っていたら教えて欲しいのです。

むしろ偶然に一度だけそのように動作したのですが、その後新しいコンピュータを手に入れたので、今は思い出せません。どなたか解決策をご存知の方がいらっしゃればと思いまして。もしそうでなければ、これ以上このスレッドを乱したくないので、問題ありません。ただ、他にどこに私の質問を投稿すればいいのかわかりませんでした。

 

先輩の皆様へ

このボリンジャーバンドを2乖離と3乖離に調整することは可能でしょうか? 現在1乖離に設定されており、設定を変更しようとしましたが、矢印のアラートが表示されなくなりました。

ありがとうございます。

//+------------------------------------------------------------------+

//| Bands.mq4

//| |

//+------------------------------------------------------------------+

#property indicator_chart_window(インジケーターチャートウィンドウ

#property indicator_buffers 5(インジケーターバッファー5

#property indicator_color1 LightSeaGreen (インジケーターカラー1 ライトシーグリーン)

#property indicator_color2 ライトシーグリーン

#property indicator_color3 ライトシーグリーン

#property indicator_color4 ライムグリーン

#property indicator_color5 オレンジ

//

//

//

//

//

extern string TimeFrame = "現在のタイムフレーム";

extern int BandsLength = 4;

extern double BandsDeviation = 1.0;

extern int AppliedPrice = 0;

extern int BandsMaMode = 0;

extern string note = "turn on Alert = true; turn off = false";

extern bool alertsOn = true;

extern bool alertsOnCurrent = true;

extern bool alertsMessage = true; extern bool alertsOnCurrent = true; extern bool alertsMessage = true;

extern bool alertsSound = true; extern bool alertsSound = true;

extern bool alertsNotify = false;

extern bool alertsEmail = false;

extern string soundFile = "alert2.wav";

extern int arrowthickness = 1;

//

//

//

//

//

double Ma[];

double UpMa[];

double DnMa[];

double CrossUp[];

double CrossDn[];

double trend[];

//

//

//

//

//

文字列 indicatorFileName;

bool calculateValue;

bool returnBars;

int timeFrame;

//+------------------------------------------------------------------+

//+------------------------------------------------------------------+

//

//

//

//

//

int init()

{

IndicatorBuffers(6);

IndicatorDigits(Digits);

SetIndexBuffer(0,Ma)を設定します。

SetIndexBuffer(1,UpMa)。

SetIndexBuffer(2,DnMa)を設定します。

SetIndexBuffer(3,CrossUp); SetIndexStyle(3,DRAW_ARROW,0,arrowthickness); SetIndexArrow(3,233)を設定します。

SetIndexBuffer(4,CrossDn ); SetIndexStyle(4,DRAW_ARROW,0,arrowthickness); SetIndexArrow(4,234).を設定します。

SetIndexBuffer(5,trend)を設定します。

//

//

//

//

//

indicatorFileName = WindowExpertName();

returnBars = TimeFrame=="returnBars"; if (returnBars) return(0).計算値 = TimeFrame=="計算値"; if (計算値) return(0)。

calculateValue = TimeFrame=="calculateValue"; if (calculateValue) return(0);

timeFrame = stringToTimeFrame(TimeFrame);

IndicatorShortName(timeFrameToString(timeFrame)+" Bollinger Bands Alerts Arrows");

return(0);

//

//

//

//

//

int deinit() { return(0); }.

//+------------------------------------------------------------------+

//+------------------------------------------------------------------+

//

//

//

//

//

int start()

{

int counted_bars=IndicatorCounted();

int i,limit;

if(counted_bars<0)戻り値(-1);

if(counted_bars>0)counted_bars--。

limit=MathMin(Bars-1,Bars-counted_bars-1);

if (returnBars) { Ma[0] = limit+1; return(0); }.

//

//

//

//

//

if (計算値 || timeFrame==Period())

{

for (i = limit; i >= 0; i--)

{

double StdDev = iStdDev(NULL,0,BandsLength,0,BandsMaMode,AppliedPrice,i)。

このような場合、「StdDev = iStdDev」、「Ma = iMA(NULL,0,BandsLength,0,BandsMaMode,AppliedPrice,i);

UpMa = Ma + (StdDev*BandsDeviation);

DnMa = Ma - (StdDev*BandsDeviation)。

トレンド = 0;

if (Close>UpMa) トレンド = 1;

if (Close<DnMa)トレンド =-1;

//

//

//

//

//

CrossUp = EMPTY_VALUE;

CrossDn = EMPTY_VALUE;

if (トレンド!=トレンド)

if (trend == 1 && trend != 3) CrossDn = High + iATR(NULL,0,20,i)/2;

if (trend == -1 && trend !=-3) CrossUp = Low - iATR(NULL,0,20,i)/2; if (trend == -1 && trend !=3) CrossDn = High + iATR(NULL,0,20,i)/2;

}

manageAlerts();

return(0);

}

//

//

//

//

//

limit = MathMax(limit,MathMin(Bars-1,iCustom(NULL,timeFrame,indicatorFileName, "returnBars",0,0)*timeFrame/Period())).Bars-1,iCustom(NULL,timeFrame,indicatorFileName,returnBars,0,0)*timeFrame/Period());

for(i=limit; i>=0; i--)

{

int y = iBarShift(NULL,timeFrame,Time);

Ma = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",BandsLength,BandsDeviation,AppliedPrice,BandsMaMode,0,y);

UpMa = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",BandsLength,BandsDeviation,AppliedPrice,BandsMaMode,1,y); DnMa = iCustom(NULL,BandsDeviation,AppliedPrice,BandsMaMode,1,y);

DnMa = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",BandsLength,BandsDeviation,AppliedPrice,BandsMaMode,2,y);

トレンド = iCustom(NULL,timeFrame,indicatorFileName, "calculateValue",BandsLength,BandsDeviation,AppliedPrice,BandsMaMode,5,y);

CrossUp = EMPTY_VALUE;

CrossDn = EMPTY_VALUE;

if (トレンド!=トレンド)

if (trend == 1 && trend != 1) CrossDn = High + iATR(NULL,0,20,i)/2;

if (trend == -1 && trend !=-1) CrossUp = Low - iATR(NULL,0,20,i)/2; if (trend == -1 && trend !=-1) CrossUp = High + iATR(NULL,0,20,i)/2;

}

manageAlerts();

return(0);

}

//

//

//

//

//

void manageAlerts()

{

if (!calculateValue && alertsOn)

{

if (alertsOnCurrent)

int whichBar = 0;

else whichBar = 1; whichBar = iBarShift(NULL,0,iTime(NULL,timeFrame,whichBar));

if (トレンド[whichBar] != トレンド[whichBar+1])

{

if (trend[whichBar+1] == 1 && trend[whichBar] != 1) doAlert(whichBar, "sell");

if (trend[whichBar+1] == -1 && trend[whichBar] !=-1) doAlert(whichBar, "buy")。

}

}

}

//

//

//

//

//

void doAlert(int forBar, string doWhat)

{

静的な文字列previousAlert="何もない";

static datetime previousTime;

文字列メッセージ

if (previousAlert != doWhat || previousTime != Time[forBar]) {

previousAlert = doWhat;

previousTime = Time[forBar]です。

//

//

//

//

//

message = StringConcatenate(Symbol()," at ",TimeToStr(TimeLocal(),TIME_SECONDS)," - ",timeFrameToString(Period())+" Bollinger Bands ",doWhat).If (alertsessage) アラートメッセージを表示します。

if (alertsMessage) アラート(メッセージ);

if (alertsNotify)SendNotification(message).もし (alertsEmail)SendNotify(message);

if (alertsEmail) SendMail(StringConcatenate(Symbol()," Bollinger Bands "),message).もし、(alertsEmail)なら、SendMailを送信します。

if (alertsSound) PlaySound(soundFile)。

}

//+-------------------------------------------------------------------

//|

//+-------------------------------------------------------------------

//

//

//

//

string sTfTable[] = {"M1", "M5", "M15", "M30", "H1", "H4", "D1", "W1", "MN"}; int iTfTable[] = {1,5,15,30,60,240,1440,10080,43200};

int iTfTable[] = {1,5,15,30,60,240,1440,10080,43200};

//

//

//

//

int stringToTimeFrame(string tfs)

{

tfs = StringUpperCase(tfs);

for (int i=ArraySize(iTfTable)-1; i>=0; i--)

if (tfs==sTfTable || tfs==""+iTfTable) return(MathMax(iTfTable,Period()));

return(Period())。

}

//

//

//

//

//

文字列 timeFrameToString(int tf)

{

for (int i=ArraySize(iTfTable)-1; i>=0; i--)

if (tf==iTfTable) return(sTfTable);

return("");

}

//

//

//

//

//

文字列 StringUpperCase(string str)

{

文字列 s = str;

for (int length=StringLen(str)-1; length>=0; length--)

{

int tchar = StringGetChar(s, length);

if((tchar > 96 && tchar 223 && tchar < 256))

s = StringSetChar(s, length, tchar - 32);

else if(tchar > -33 && tchar < 0)

s = StringSetChar(s, length, tchar + 224);

return(s);

}

//------------------------------------------------------------------

//

//------------------------------------------------------------------

//

//

//

//

//

 
mrtools:
Jozyさん、インジケーターを掲載するのを忘れているようです。

大変申し訳ございませんでした。これがそのインジケータです。

ファイル:
 

mr toolsやmladenなど。

このインジケータをMTF化していただけないでしょうか?

よろしくお願いします。

マルコ

ファイル:
 

こんにちは。

このインジケータFantailを持っているのですが、MTFにすることができれば最高なのですが。

あなたの助けをありがとうございます。

ファイル:
 
Jozy:
Mladenさん、またはMrtoolsさん、このインジケータにアラートを出すことは可能でしょうか?ゼロクロスと色の変化で?

ありがとうございます。

Jozy

Jozyさん、色や傾きの変化、ゼロクロスに対するアラートのオプションを追加しました。

ファイル:
 
split15:
こんにちは。

このインジケータFantailを持っていますが、MTFにすることができれば最高なのですが?

ありがとうございました。

Split15さん、mtfを追加しました。

ファイル: