ICustom機能 - ページ 22

 
SantaClaus:
英語は母国語ではありませんが、私の質問がそれほど間違っているとは本当に思いませんでした。言葉をマークする」のではなく、私の問題への解決策を見つけることができます。私は再び質問をしようとします。

私のEAが、私のインジケータから単純なプットとコールを認識するための最良の方法は何でしょうか?

明らかに私のコードはうまくいかず、あなたが私に言ったように「1」を「0」に変えようとしました。

動作しないコードをここに投稿(添付)してください - あなたがテストしているmqlファイル、あなたがこれまでに書いたもの

 

私のプライベートなコードなので、共有したくないのです。しかし、私が提供したコード以外に何を見る必要があるのでしょうか?

何か忘れていることはありませんか?

 
SantaClaus:
これは私のプライベートなコードなので、共有したくありません。しかし、私が提供したコード以外に何を見る必要がありますか? 何か私が忘れていることはありますか?

つまり、あなたは誰かにコーディングの手助けをしてもらいたいのに、エラーがないかチェック するためにコードを見せたくない、その代わりに、あなたが受けたすべてのアドバイス、そして何千何万もの他のコードで機能しているものが、あなたにとっては機能していないと主張しているのですね?

わかりました。私は今、あなたの立場を理解しています。あなたのコーディングに幸運を

ハッピートレード

 

動かないプライベートコード?面白い

 

私の投稿のうち2つは、私が知らない何らかの理由で削除されました。

しかし、私が遭遇した問題は、私が読もうとしているものを邪魔するいくつかの他のバッファがあったということでした。現在、解決しています。

 

助けて欲しいのですが関数を使用しない場合、シンボル名を二重引用符で囲むと、例えば icustom("EURUSDmicro",0,channel-signal",2,1) のように動作しますが、関数を使用する場合、二重引用符は渡されません。

void OnTick()

{

CalcDisplay("EURUSDmicro"); //--------FUNCTION CALL-------

}

void CalcDisplay(string TxtCurrency) //--------FUNCTION-------

{

double Value=icustom(TxtCurrency,0,channel-signal",2,1);

...

...

..

}

 
Richard Sidric:
助けて欲しいのですが関数を使用しない場合、シンボル名を二重引用符で囲むと、例えば icustom("EURUSDmicro",0,channel-signal",2,1) のように動作しますが、関数を使用すると、二重引用符は渡されません。

void OnTick()

{

CalcDisplay("EURUSDmicro"); //--------FUNCTION CALL-------

}

void CalcDisplay(string TxtCurrency) //--------FUNCTION-------

{

double Value=icustom(TxtCurrency,0,channel-signal",2,1);

...

...

..

}

引用符は必要ありません。必要なのは、文字列であることのみです。

___________________

追記:iCiustomの呼び出しで、引用符が1つ足りませんね。これは次のようなものです。

double Value=icustom(TxtCurrency,0,channel-signal",2,1);

で、本来はこうでなければなりません。

double Value=icustom(TxtCurrency,0, "channel-signal",2,1) のようにしなければなりません。

 

こんにちは、皆さん。私はT4インジケーターを1つ持っていて、以下に添付しています。

( 私はすでに手動で使っていますが、コンピュータの前に座って)

もし、これを自動売買に使うなら、どうすればいいのか、どなたか教えてください。

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

// monyによるオリジナルのisedと最初の実装

// trisバージョン by mladen

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

#property copyright "mony & mladen" (著作権)

#property リンク "made at www.forex.tsd.com"

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

#property indicator_buffers 5

#property indicator_color1 中ブルー

#property indicator_color2 レッド

#property indicator_color3 ブルー(中) #property indicator_color3 レッド(青

#property indicator_color4 レッド

#property indicator_color5 レッド

#property indicator_width3 3 (幅)

#property indicator_width4 3(プロパティ インジケータ幅4 3

#property indicator_width5 3(プロパティ インジケータ幅5 3

#property strict

//

//

//

//

//

//

enum enDisplay

{

dis_line, // 色付きの線を表示する

dis_bars, // 色付きバーを表示する

dis_both // 色付き線とバーの両方を表示する。

};

extern int CCIperiod = 3; // CCI期間

extern int ATRperiod = 300; // ATR期間

extern ENUM_APPLIED_PRICE applied_price = PRICE_TYPICAL; // 使用する価格

extern enDisplay DisplayType = dis_line; // 表示タイプ

extern bool alertsOn = true; // アラートをオンにする

extern bool alertsOnCurrent = false; // 現在の(まだ開いている)バーでアラートを出す

extern bool alertsMessage = true; // アラートにポップアップメッセージを表示する。

extern bool alertsSound = true; // アラート音を再生します。

extern bool alertsNotify = true; // アラートは通知を送信します。

extern bool alertsEmail = false; // アラートメールを送信します。

extern string soundFile = "o.wma"; // アラート音に使用するサウンドファイル

double TrLine[];

double TrendDowna[];

double TrendDownb[];

double HistUp[];

double HistDn[];

double trend[];

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

//

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

//

//

//

//

//

int init()

{

IndicatorBuffers(6);

int styleLine = DRAW_LINE; if (DisplayType==dis_bars) styleLine=DRAW_NONE.int styleBars = DRAW_HISTOGRAM; if (DisplayType==dis_bars) styleBars=DRAW_NONE;

int styleBars = DRAW_HISTOGRAM; if (DisplayType==dis_line) styleBars=DRAW_NONE; int styleBars = DRAW_HISTOGRAM; if (DisplayType==dis_line) styleBars=DRAW_NONE;

SetIndexBuffer(0, HistUp); SetIndexStyle(0,styleBars).SetIndexBuffer(0,HistUp)を設定する。

SetIndexBuffer(1, HistDn); SetIndexStyle(1,styleBars); SetIndexStyle(1, styleBars);

SetIndexBuffer(2, TrLine); SetIndexStyle(2,styleLine).を設定する。

SetIndexBuffer(3, TrendDowna); SetIndexStyle(3,styleLine).SetIndexBuffer(3,styleLine)を設定する。

SetIndexBuffer(4, TrendDownb); SetIndexStyle(4,styleLine)を設定します。

SetIndexBuffer(5, trend);

return(0);

}

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

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

//

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

//

//

//

//

//

int start()

{

int counted_bars=IndicatorCounted();

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

if(counted_bars>0) counted_bars--;

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

//

//

//

//

//

if (trend[limit]==-1) CleanPoint(limit,TrendDowna,TrendDownb).for(int i=limit; i > 0; i--);

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

{

double cciTrendNow = iCCI(NULL, 0, CCIperiod, applied_price, i).if(cciTrendNow)=iCCI(NULL)です。

if (cciTrendNow >= 0)

{

TrLine = NormalizeDouble(Low - iATR(NULL, 0, ATRperiod, i),Digits);

if (i<(Bars-1) && TrLine < TrLine) TrLine = TrLine;

}

if (cciTrendNow <= 0)

{

TrLine = NormalizeDouble(High + iATR(NULL, 0, ATRperiod, i),Digits).If (i TrLine) TrLine = NormalizeDouble(NULL, 0, ATRperiod, i),Digits);

if (i TrLine) TrLine = TrLine;

}

//

//

//

//

//

TrendDowna = EMPTY_VALUE;

TrendDownb = EMPTY_VALUE;

if (i<(Bars-1))

{

trend = trend;

if (TrLine> TrLine) トレンド = 1;

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

if (trend == -1) PlotPoint(i,TrendDowna,TrendDownb,TrLine);

if (trend == 1) { HistUp = High; HistDn = Low; }.

if (trend == -1) { HistDn = High; HistUp = Low; }.

}

manageAlerts();

return(0);

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

//|

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

//

//

//

//

//

void manageAlerts()

{

if (alertsOn)

{

int whichBar = 1; if (alertsOnCurrent) whichBar = 0;

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

{

if (trend[whichBar] == 1) doAlert(whichBar, "up");

if (trend[whichBar] ==-1) doAlert(whichBar, "down")。

}

}

}

//

//

//

//

//

void doAlert(int forBar, string doWhat)

{

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

static datetime previousTime;

文字列メッセージ

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

previousAlert = doWhat;

previousTime = Time[forBar]です。

//

//

//

//

//

message = Symbol()+" at "+TimeToStr(TimeLocal(),TIME_SECONDS)+" SP MY trend changed to "+doWhat;

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

if (alertsNotify) SendNotification(メッセージ);

if (alertsEmail) SendMail(Symbol()+" S P MY",message).を送信します。

if (alertsSound) PlaySound(soundFile)。

}

}

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

//

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

//

//

//

//

void CleanPoint(int i,double& first[],double& second[])

{

if (i>=Bars-3) return;

if ((second != EMPTY_VALUE) && (second != EMPTY_VALUE))

second = EMPTY_VALUE とする。

さもなくば

if ((first != EMPTY_VALUE) && (first != EMPTY_VALUE) && (first == EMPTY_VALUE))

first = EMPTY_VALUE;

}

void PlotPoint(int i,double& first[],double& second[],double& from[])

{

if (i>=Bars-2) return;

if (first == EMPTY_VALUE)

if (first == EMPTY_VALUE)

{ first = from; first = from; second = EMPTY_VALUE; }.

else { second = from; second = from; first = EMPTY_VALUE; }.

else { first = from; second = EMPTY_VALUE; }.

}

s_p_mony__alerts_1.01.mq4

ファイル:
 
mony:
こんにちは、皆さん。私は以下のT4インジケータを持っていますが、私はちょうど私がロボットの取引とロボットの取引やEAが同じであるかどうか、これを使用することができます知ってほしい。

( 私はすでにそれを使用しています マニュアル取引は、コンピュータの前に座っていますが )

もしこれを自動売買に使ったら、どうしたらいいでしょうか?

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

// オリジナルのisedと最初の実装はMonyによるものです

// trisバージョン by mladen

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

#property copyright "mony & mladen" (著作権)

#property リンク "made at www.forex.tsd.com"

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

#property indicator_buffers 5

#property indicator_color1 中ブルー

#property indicator_color2 レッド

#property indicator_color3 ブルー(中) #property indicator_color3 レッド(青

#property indicator_color4 レッド

#property indicator_color5 レッド

#property indicator_width3 3 (幅)

#property indicator_width4 3(プロパティ インジケータ幅4 3

#property indicator_width5 3(プロパティ インジケータ幅5 3

#property strict

//

//

//

//

//

//

enum enDisplay

{

dis_line, // 色付きの線を表示する

dis_bars, // 色付きバーを表示する

dis_both // 色付きラインとバーの両方を表示する。

};

extern int CCIperiod = 3; // CCI期間

extern int ATRperiod = 300; // ATR期間

extern ENUM_APPLIED_PRICE applied_price = PRICE_TYPICAL; // 使用する価格

extern enDisplay DisplayType = dis_line; // 表示タイプ

extern bool alertsOn = true; // アラートをオンにする

extern bool alertsOnCurrent = false; // 現在の(まだ開いている)バーでアラートを出す

extern bool alertsMessage = true; // アラートにポップアップメッセージを表示する。

extern bool alertsSound = true; // アラート音を再生します。

extern bool alertsNotify = true; // アラートは通知を送信します。

extern bool alertsEmail = false; // アラートメールを送信します。

extern string soundFile = "o.wma"; // アラート音に使用するサウンドファイル

double TrLine[];

double TrendDowna[];

double TrendDownb[];

double HistUp[];

double HistDn[];

double trend[];

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

//

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

//

//

//

//

//

int init()

{

IndicatorBuffers(6);

int styleLine = DRAW_LINE; if (DisplayType==dis_bars) styleLine=DRAW_NONE.int styleBars = DRAW_HISTOGRAM; if (DisplayType==dis_bars) styleBars=DRAW_NONE;

int styleBars = DRAW_HISTOGRAM; if (DisplayType==dis_line) styleBars=DRAW_NONE; int styleBars = DRAW_HISTOGRAM; if (DisplayType==dis_line) styleBars=DRAW_NONE;

SetIndexBuffer(0, HistUp); SetIndexStyle(0,styleBars).SetIndexBuffer(0,HistUp)を設定する。

SetIndexBuffer(1, HistDn); SetIndexStyle(1,styleBars); SetIndexStyle(1, styleBars);

SetIndexBuffer(2, TrLine); SetIndexStyle(2,styleLine).を設定する。

SetIndexBuffer(3, TrendDowna); SetIndexStyle(3,styleLine).SetIndexBuffer(3,styleLine)を設定する。

SetIndexBuffer(4, TrendDownb); SetIndexStyle(4,styleLine)を設定します。

SetIndexBuffer(5, trend);

return(0);

}

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

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

//

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

//

//

//

//

//

int start()

{

int counted_bars=IndicatorCounted();

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

if(counted_bars>0) counted_bars--;

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

//

//

//

//

//

if (trend[limit]==-1) CleanPoint(limit,TrendDowna,TrendDownb).for(int i=limit; i > 0; i--);

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

{

double cciTrendNow = iCCI(NULL, 0, CCIperiod, applied_price, i).if(cciTrendNow)=iCCI(NULL)です。

if (cciTrendNow >= 0)

{

TrLine = NormalizeDouble(Low - iATR(NULL, 0, ATRperiod, i),Digits);

if (i<(Bars-1) && TrLine < TrLine) TrLine = TrLine;

}

if (cciTrendNow <= 0)

{

TrLine = NormalizeDouble(High + iATR(NULL, 0, ATRperiod, i),Digits).If (i TrLine) TrLine = NormalizeDouble(NULL, 0, ATRperiod, i),Digits);

if (i TrLine) TrLine = TrLine;

}

//

//

//

//

//

TrendDowna = EMPTY_VALUE;

TrendDownb = EMPTY_VALUE;

if (i<(Bars-1))

{

trend = trend;

if (TrLine> TrLine) トレンド = 1;

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

if (trend == -1) PlotPoint(i,TrendDowna,TrendDownb,TrLine);

if (trend == 1) { HistUp = High; HistDn = Low; }.

if (trend == -1) { HistDn = High; HistUp = Low; }.

}

manageAlerts();

return(0);

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

//|

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

//

//

//

//

//

void manageAlerts()

{

if (alertsOn)

{

int whichBar = 1; if (alertsOnCurrent) whichBar = 0;

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

{

if (trend[whichBar] == 1) doAlert(whichBar, "up");

if (trend[whichBar] ==-1) doAlert(whichBar, "down")。

}

}

}

//

//

//

//

//

void doAlert(int forBar, string doWhat)

{

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

static datetime previousTime;

文字列メッセージ

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

previousAlert = doWhat;

previousTime = Time[forBar]です。

//

//

//

//

//

message = Symbol()+" at "+TimeToStr(TimeLocal(),TIME_SECONDS)+" SP MY trend changed to "+doWhat;

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

if (alertsNotify) SendNotification(メッセージ);

if (alertsEmail) SendMail(Symbol()+" S P MY",message).を送信します。

if (alertsSound) PlaySound(soundFile)。

}

}

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

//

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

//

//

//

//

void CleanPoint(int i,double& first[],double& second[])

{

if (i>=Bars-3) return;

if ((second != EMPTY_VALUE) && (second != EMPTY_VALUE))

second = EMPTY_VALUE とする。

さもなくば

if ((first != EMPTY_VALUE) && (first != EMPTY_VALUE) && (first == EMPTY_VALUE))

first = EMPTY_VALUE;

}

void PlotPoint(int i,double& first[],double& second[],double& from[])

{

if (i>=Bars-2) return;

if (first == EMPTY_VALUE)

if (first == EMPTY_VALUE)

{ first = from; first = from; second = EMPTY_VALUE; }.

else { second = from; second = from; first = EMPTY_VALUE; }.

else { first = from; second = EMPTY_VALUE; }.

}

s_p_mony__alerts_1.01.mq4

EAからiCustom()呼び出しはもう試されましたか?

iCustom()関数でインジケータを呼び出し、トレンドバッファ(メタトレーダーではバッファ5)を読み込んで、値が-1から+1、+1から-1に変化したらシグナルが発生するというものです。

 

私はiCustom()呼び出しが 何であるかわからない......とどこに私が試すことができますか?.............私はMT4でそれを見つけたか、またはときにインジケータを変更するだけで私は自動tradin /ロボ取引にこのS Pモニー指標を使用できる方法を教えてください先生................それはそれだ。

これはすべての長いプロセスである場合は、私を許して、上記の記事を忘れてくださいありがとうございました。