コーディングのヘルプ - ページ 394 1...387388389390391392393394395396397398399400401...786 新しいコメント learning 2014.11.15 21:16 #3931 mladen microsoftvisual studioを 使用した最も効率的なDLLの提案はありますか? pking25 2014.11.16 00:23 #3932 Jeeves: もし、Wav.サウンドのアラートを、5つ全部が「一列に並んだ」ときだけにしてほしいと頼んだら、私は運を使い果たすことになるのでしょうか?ユーザーによるサウンド入力の選択 私はこのゲームを長くやっているので、よく分かっているのです。 オプション>アラートボックスにWav.ファイルを置くだけでよかったんです。 このような愚かなことをするのは申し訳なく、また、私にそれを考えさせるように仕向けたのはあなたです。 Mladen Rakic 2014.11.16 18:38 #3933 Jeeves: 私はこのゲームを長くやっているので、よく分かっているのですが、当然の返答だと思います。 オプション>アラートボックスにWav.ファイルを置くだけでよかったんです。 このような愚かなMladenは申し訳ありません、そして、私にそれを考えることを強要したのはあなたです。 ご心配なく 週末は真剣にブレインストーミングをする時間ではありません。 mr-roma 2014.11.16 22:09 #3934 こんにちは、私はいくつかの助けを必要とし、誰かができる場合は、私を助けてください:/。 そこで、私は注文の合計をチェック し、それらの背景を奇数と偶数のように色付けしたいと思います。 このように しかし、私の問題は、最後の1つのラベルです :/ この画像では、私の合計受注は5ですが、ラベルは6です :/。 これは私のコードです。 int ticket1 = OrdersTotal(); int a_ticket1[]; ArrayResize( a_ticket1, ticket1 ); for (int cnt1=0;cnt1<ticket1;cnt1++) { if ( !OrderSelect(cnt1,SELECT_BY_POS,MODE_TRADES) ) continue; a_ticket1[cnt1]=OrderTicket(); int orcol; if(ExtLines<0) { for(orcol=0; orcol<9; orcol++) { string OrderNumber1 = "Orders Background " +cnt1/2+orcol; string OrderNumbert1 = "Orders Backgrnds " +cnt1/2+orcol; if(ObjectCreate(OrderNumber1,OBJ_LABEL,0,0,0)) { string Ydistanc1 = 65 + (24 * cnt1); ObjectSetText(OrderNumber1, Obg[orcol], 15, "Acc_info", Gray); ObjectSet(OrderNumber1, OBJPROP_CORNER, 0); ObjectSet(OrderNumber1, OBJPROP_XDISTANCE, Obgs[orcol]); ObjectSet(OrderNumber1, OBJPROP_YDISTANCE, Ydistanc1); } if(ObjectCreate(OrderNumbert1,OBJ_LABEL,0,0,0)) { string Ydistanct1 = 89 + (24 * cnt1); ObjectSetText(OrderNumbert1, Obg[orcol], 15, "Acc_info", DarkGray); ObjectSet(OrderNumbert1, OBJPROP_CORNER, 0); ObjectSet(OrderNumbert1, OBJPROP_XDISTANCE, Obgs[orcol]); ObjectSet(OrderNumbert1, OBJPROP_YDISTANCE, Ydistanct1); } } } } 事前にありがとうございました、私の悪い英語のために申し訳ありません ファイル: capturedfdsgfd.png 12 kb Coding help コーディングの方法は? アスク! secretcode 2014.11.17 04:46 #3935 コーダーの皆様へ ご教授願います。 添付のインジケータは正常に動作しますが、レベルを「0 & 100」に設定すると、ヒスト(中心線)の色が変わりません。 このレベルでも動作させることは可能でしょうか? よろしくお願いします。 シークレットコード ファイル: rsx_nrp_v1_alerts_mtf_nmc.mq4 11 kb Mladen Rakic 2014.11.17 07:38 #3936 secretcode: コーダーの皆様へご教授ください 添付のインジケータは正常に動作しますが、レベルを " 0 & 100 " に設定すると、ヒスト(中心線)の色が変わりません ! このレベルでも動作させることは可能でしょうか? よろしくお願いします。 シークレットコード シークレットコード RSXの値は、レベルの値より 大きいか小さいかでなければなりません。100と0ではなく、99.9999と0.0001で試してみてください。 secretcode 2014.11.17 07:46 #3937 mladen: secretcode RSXの値はレベル値より大きいか小さいかでなければなりません。100と0ではなく、99.9999と0.0001を使用してみてください。 Mladenさん、ありがとうございました。 よろしくお願いします。 シークレットコード 削除済み 2014.11.18 02:47 #3938 ムラデンさん、こんにちは。よろしくお願いします。 私はサポートとレジスタンスのブレイクアウトに基づいた独自のインジケータを開発しています。 私はそれがほぼ準備ができているが、私はどこにコードに挿入するか、またはそれをよりよく書くのかわからない32のものがあります。 1.-最初の事は、最初の注文は、別の色、この場合は色のライム、および色の赤で買った後の最初の売りでペイントするために販売した後、購入することである。 2.-指標は、この順序のテキストとポップアップを展開することを確認するには、別の色で "ペア......ロング行く "と "ペア......ショート行く "と言っている。 3.-フラクタルズ・インディケーターの コードを私のコードに組み込んで、すべてが一体となるようにすること。 これは、私が今までに持っている私のインジケータのためのものです。 #property strict #property indicator_chart_window #プロパティ indicator_buffers 4 #property indicator_color1 clrLime (インジケータカラー1) #property indicator_color2 clrRed(インジケーターカラー2・レッド #プロパティ indicator_color3 clrMagenta #property indicator_color4 clrCyan (インジケーターカラー4) #define BUY 1 #define SELL 2 double Buy[], Sell[], FirstBuy[], FirstSell[]; int OnInit() { SetIndexBuffer(0,FirstBuy)を設定します。 SetIndexBuffer(1,FirstSell)を設定します。 SetIndexBuffer(2,Buy)を設定します。 SetIndexBuffer(3,Sell)を設定します。 for(int i=0; i<4; i++) { {インデックススタイル(1)を設定します。 SetIndexStyle (i,DRAW_ARROW,STYLE_SOLID,2);}を設定します。 SetIndexArrow (0,233)を設定します。 SetIndexArrow (1,234)。 SetIndexArrow (2,233).SetIndexArrow(2,233)。 SetIndexArrow (3,234)。 return(INIT_SUCCEEDED);}. void OnDeinit(const int reason) {} int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[]、const double &high[]、const double &low[]。 const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { 静的 int lastSignal=0; for(int i=MathMin(rates_total-prev_calculated, rates_total-1); i>=0; i--){ FirstBuy=FirstSell=Buy=Sell=EMPTY_VALUEです。 datetime when=Time; int x=iBarShift(NULL,PERIOD_H1, when), y=iBarShift(NULL,PERIOD_M15,when)。 z=iBarShift(NULL,PERIOD_M5,when)です。 double srUpH1 = iCustom(NULL,PERIOD_H1, "Support and Resistance (Barry)",0,x)です。 srDownH1 = iCustom(NULL,PERIOD_H1, "Support and Resistance (Barry)",1,x).となります。 MidH1 = (srUpH1+srDownH1)/2, srUp15M = iCustom(NULL,PERIOD_M15, "Support and Resistance (Barry)",0,y)とします。 srDown15M = iCustom(NULL,PERIOD_M15, "Support and Resistance (Barry)",1,y)です。 Mid15M=(srUp15M+srDown15M)/2.Mid15M=(srUp15M+srDown15M)/2, srUp5M = iCustom(NULL,PERIOD_M5, "Support and Resistance (Barry)",0,z)です。 srDown5M = iCustom(NULL,PERIOD_M5, "Support and Resistance (Barry)",1,z)です。 Mid5M = (srUp5M+srDown5M)/2, srUp = iCustom(NULL,0, "Support and Resistance (Barry)",0,i)。 srDown = iCustom(NULL,0, "Support and Resistance (Barry)",1,i).となります。 if(ClosesrUp){。 if(lastSignal==SELL)の場合{。 FirstBuy=Low-_Point。 SoundAlert(when, "Buy");}. else { 買い=低ポイント; } } else lastSignal=BUY;}。 if(Close>srUpH1 && Close<srDown) {。 if(lastSignal==BUY)の場合{。 FirstSell=High+_Point。 SoundAlert(when, "Sell");}. else { 売り=High+_Point; } } else { 売り=High+_Point lastSignal=SELL;}}となる。 return(rates_total);} void SoundAlert(datetime i, string dir) { { static datetime lastAlert=0; if(lastAlert!=i){。 Alert(StringFormat("%s signal on %s at %s",dir,Symbol(),TimeToStr(i))); lastAlert=i;}} これはサポートとレジスタンスのフラクタルのコードですが、どこに入力すればいいのかわかりません。 #プロパティ indicator_chart_window#プロパティ indicator_buffers 2 #プロパティ indicator_color1 Red #プロパティ indicator_color2 Blue //---- buffers double v1[]; double v2[]; double val1; double val2; int i; int init() { IndicatorBuffers(2); //---- 描画設定 SetIndexArrow(0, 119); SetIndexArrow(1, 119); SetIndexStyle(0,DRAW_ARROW,STYLE_DOT,1,Red); SetIndexDrawBegin(0,i-1); SetIndexBuffer(0, v1).SetIndexBuffer(2); //---- インデックスバッファの 設定SetIndexArrow( 1); SetIndexArrow(2); //---- インデックスバッファを設定する。SetIndexLabel(0, "Resistance"); SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1,Blue); SetIndexDrawBegin(1,i-1); SetIndexBuffer(1, v2); SetIndexLabel(1, "Support"); return(0); } int start() { i=Bars. Bars.Bars;setIndexDrawBuffer(2);SetIndexStyle(1);SetIndexLabel(1); setIndexDrawBegin(1)while(i>=0) { val1 = iFractals(NULL, 0, MODE_UPPER,i); if (val1 > 0) v1=High; else v1 = v1; val2 = iFractals(NULL, 0, MODE_LOWER,i); if (val2 > 0) v2=Low; else v2 = v2; i--; } return(0);}}{val1=H1, iFractals=H2,if ( v1>0) v1=H2; elsev1=H2; }return(0); } } { val1=H1, iFractals=H2//+------------------------------------------------------------------------+ [/TD][/TD][/TR] [TD="class: bb-bot, width: 100%"] [TD="class: bb-right-bot, width: 4" ]ありがとうございました。 Coding help [警告は閉鎖されました!】フォーラムを乱雑にしないために、どんな初心者の質問でも。プロフェッショナルは、通り過ぎないでください。あなたなしでは、どこにも行けない。 Metastock to MT4 Mladen Rakic 2014.11.18 06:23 #3939 daniel1983: こんにちは、Mladenさん。助けてもらえますか? 私はサポートとレジスタンスのブレイクアウトに基づいた独自のインジケータを開発しています。私はそれがほぼ準備ができているが、私はどこにコードに挿入したり、より良いそれを書くためにわからない32のものです。1.-最初の事は、最初の注文は、別の色、この場合は色のライム、および色の赤で買った後の最初の売りでペイントするために販売した後、購入することである。2.-指標は、この順序のテキストとポップアップを展開することを確認するには、別の色で "ペア......ロング行く "と "ペア......ショート行く "と言っている。3.- フラクタルズ・インディケーターのコードを私のコードに組み込んで、すべてが一体となるようにすること。これは、私が今までに持っている私のインジケータのためのものです。#property strict#property indicator_chart_window#プロパティ indicator_buffers 4#property indicator_color1 clrLime (インジケータカラー1)#property indicator_color2 clrRed(インジケーターカラー2・レッド#プロパティ indicator_color3 clrMagenta#property indicator_color4 clrCyan (インジケーターカラー4)#define BUY 1#define SELL 2double Buy[], Sell[], FirstBuy[], FirstSell[];int OnInit() { SetIndexBuffer(0,FirstBuy)を設定します。 SetIndexBuffer(1,FirstSell)を設定します。 SetIndexBuffer(2,Buy)を設定します。 SetIndexBuffer(3,Sell)を設定します。 for(int i=0; i<4; i++) { {インデックススタイル(1)を設定します。 SetIndexStyle (i,DRAW_ARROW,STYLE_SOLID,2);}を設定します。 SetIndexArrow (0,233)を設定します。 SetIndexArrow (1,234)。 SetIndexArrow (2,233).SetIndexArrow(2,233)。 SetIndexArrow (3,234)。 return(INIT_SUCCEEDED);}.void OnDeinit(const int reason) {}int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[]、const double &high[]、const double &low[]。 const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { 静的 int lastSignal=0; for(int i=MathMin(rates_total-prev_calculated, rates_total-1); i>=0; i--){ FirstBuy=FirstSell=Buy=Sell=EMPTY_VALUEです。 datetime when=Time; int x=iBarShift(NULL,PERIOD_H1, when), y=iBarShift(NULL,PERIOD_M15,when)。 z=iBarShift(NULL,PERIOD_M5,when)です。 double srUpH1 = iCustom(NULL,PERIOD_H1, "Support and Resistance (Barry)",0,x)です。 srDownH1 = iCustom(NULL,PERIOD_H1, "Support and Resistance (Barry)",1,x).となります。 MidH1 = (srUpH1+srDownH1)/2, srUp15M = iCustom(NULL,PERIOD_M15, "Support and Resistance (Barry)",0,y)とします。 srDown15M = iCustom(NULL,PERIOD_M15, "Support and Resistance (Barry)",1,y)です。 Mid15M=(srUp15M+srDown15M)/2.Mid15M=(srUp15M+srDown15M)/2, srUp5M = iCustom(NULL,PERIOD_M5, "Support and Resistance (Barry)",0,z)です。 srDown5M = iCustom(NULL,PERIOD_M5, "Support and Resistance (Barry)",1,z)です。 Mid5M = (srUp5M+srDown5M)/2, srUp = iCustom(NULL,0, "Support and Resistance (Barry)",0,i)。 srDown = iCustom(NULL,0, "Support and Resistance (Barry)",1,i).となります。 if(ClosesrUp){。 if(lastSignal==SELL)の場合{。 FirstBuy=Low-_Point。 SoundAlert(when, "Buy");}. else { 買い=低ポイント; } } else lastSignal=BUY;}。 if(Close>srUpH1 && Close<srDown) {。 if(lastSignal==BUY)の場合{。 FirstSell=High+_Point。 SoundAlert(when, "Sell");}. else { 売り=High+_Point; } } else { 売り=High+_Point lastSignal=SELL;}}となる。 return(rates_total);} void SoundAlert(datetime i, string dir) { { static datetime lastAlert=0; if(lastAlert!=i){。 Alert(StringFormat("%s signal on %s at %s",dir,Symbol(),TimeToStr(i))); lastAlert=i;}}これはサポートとレジスタンスのフラクタルのコードですが、どこに入力すればいいのかわかりません。 #プロパティ indicator_chart_window#プロパティ indicator_buffers 2 #プロパティ indicator_color1 Red #プロパティ indicator_color2 Blue //---- buffers double v1[]; double v2[]; double val1; double val2; int i; int init() { IndicatorBuffers(2); //---- 描画設定 SetIndexArrow(0, 119); SetIndexArrow(1, 119); SetIndexStyle(0,DRAW_ARROW,STYLE_DOT,1,Red); SetIndexDrawBegin(0,i-1); SetIndexBuffer(0, v1).SetIndexBuffer(2); //---- インデックスバッファの 設定SetIndexArrow( 1); SetIndexArrow(2); //---- インデックスバッファを設定する。SetIndexLabel(0, "Resistance"); SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1,Blue); SetIndexDrawBegin(1,i-1); SetIndexBuffer(1, v2); SetIndexLabel(1, "Support"); return(0); } int start() { i=Bars. Bars.Bars;setIndexDrawBuffer(2);SetIndexStyle(1);SetIndexLabel(1); setIndexDrawBegin(1)while(i>=0) { val1 = iFractals(NULL, 0, MODE_UPPER,i); if (val1 > 0) v1=High; else v1 = v1; val2 = iFractals(NULL, 0, MODE_LOWER,i); if (val2 > 0) v2=Low; else v2 = v2; i--; } return(0);}}{val1=H1, iFractals=H2,if ( v1>0) v1=H2; elsev1=H2; }return(0); } } { val1=H1, iFractals=H2//+------------------------------------------------------------------------+ [/TD][/TD][/TR] [TD="class: bb-bot, width: 100%"] [TD="class: bb-right-bot, width: 4" ]ありがとうございます。 ダニエル1983 ポイント2と3を今更。 2.単にポップアップ警告を持つためにAlert(t "ポップアップウィンドウに使用するテキスト")を追加 します。 3.良いアイデアではありません - コードが複雑になり、何かが間違って動作する可能性が高くなります。 secretcode 2014.11.18 06:25 #3940 Mladen様 この投稿のように、添付のインジケータに「バンドを追加」することは可能でしょうか :https://www.mql5.com/en/forum/172894/page45 このインディケータはエリートセクションのものですが、バンドを追加する方法が好きです。 よろしくお願いします。 秘密のコード ファイル: ema_variation__filter_mtf_1.01_nmc.mq4 9 kb 1...387388389390391392393394395396397398399400401...786 新しいコメント 取引の機会を逃しています。 無料取引アプリ 8千を超えるシグナルをコピー 金融ニュースで金融マーケットを探索 新規登録 ログイン スペースを含まないラテン文字 このメールにパスワードが送信されます エラーが発生しました Googleでログイン WebサイトポリシーおよびMQL5.COM利用規約に同意します。 新規登録 MQL5.com WebサイトへのログインにCookieの使用を許可します。 ログインするには、ブラウザで必要な設定を有効にしてください。 ログイン/パスワードをお忘れですか? Googleでログイン
mladen
microsoftvisual studioを 使用した最も効率的なDLLの提案はありますか?
もし、Wav.サウンドのアラートを、5つ全部が「一列に並んだ」ときだけにしてほしいと頼んだら、私は運を使い果たすことになるのでしょうか?ユーザーによるサウンド入力の選択
私はこのゲームを長くやっているので、よく分かっているのです。
オプション>アラートボックスにWav.ファイルを置くだけでよかったんです。 このような愚かなことをするのは申し訳なく、また、私にそれを考えさせるように仕向けたのはあなたです。
私はこのゲームを長くやっているので、よく分かっているのですが、当然の返答だと思います。 オプション>アラートボックスにWav.ファイルを置くだけでよかったんです。 このような愚かなMladenは申し訳ありません、そして、私にそれを考えることを強要したのはあなたです。
ご心配なく
週末は真剣にブレインストーミングをする時間ではありません。
こんにちは、私はいくつかの助けを必要とし、誰かができる場合は、私を助けてください:/。
そこで、私は注文の合計をチェック し、それらの背景を奇数と偶数のように色付けしたいと思います。
このように
しかし、私の問題は、最後の1つのラベルです :/ この画像では、私の合計受注は5ですが、ラベルは6です :/。
これは私のコードです。
int ticket1 = OrdersTotal();
int a_ticket1[];
ArrayResize( a_ticket1, ticket1 );
for (int cnt1=0;cnt1<ticket1;cnt1++)
{
if ( !OrderSelect(cnt1,SELECT_BY_POS,MODE_TRADES) ) continue;
a_ticket1[cnt1]=OrderTicket();
int orcol;
if(ExtLines<0)
{
for(orcol=0; orcol<9; orcol++)
{
string OrderNumber1 = "Orders Background " +cnt1/2+orcol;
string OrderNumbert1 = "Orders Backgrnds " +cnt1/2+orcol;
if(ObjectCreate(OrderNumber1,OBJ_LABEL,0,0,0))
{
string Ydistanc1 = 65 + (24 * cnt1);
ObjectSetText(OrderNumber1, Obg[orcol], 15, "Acc_info", Gray);
ObjectSet(OrderNumber1, OBJPROP_CORNER, 0);
ObjectSet(OrderNumber1, OBJPROP_XDISTANCE, Obgs[orcol]);
ObjectSet(OrderNumber1, OBJPROP_YDISTANCE, Ydistanc1);
}
if(ObjectCreate(OrderNumbert1,OBJ_LABEL,0,0,0))
{
string Ydistanct1 = 89 + (24 * cnt1);
ObjectSetText(OrderNumbert1, Obg[orcol], 15, "Acc_info", DarkGray);
ObjectSet(OrderNumbert1, OBJPROP_CORNER, 0);
ObjectSet(OrderNumbert1, OBJPROP_XDISTANCE, Obgs[orcol]);
ObjectSet(OrderNumbert1, OBJPROP_YDISTANCE, Ydistanct1);
}
}
}
}事前にありがとうございました、私の悪い英語のために申し訳ありません
コーダーの皆様へ
ご教授願います。
添付のインジケータは正常に動作しますが、レベルを「0 & 100」に設定すると、ヒスト(中心線)の色が変わりません。
このレベルでも動作させることは可能でしょうか?
よろしくお願いします。
シークレットコード
コーダーの皆様へ
ご教授ください
添付のインジケータは正常に動作しますが、レベルを " 0 & 100 " に設定すると、ヒスト(中心線)の色が変わりません !
このレベルでも動作させることは可能でしょうか?
よろしくお願いします。
シークレットコードシークレットコード
RSXの値は、レベルの値より 大きいか小さいかでなければなりません。100と0ではなく、99.9999と0.0001で試してみてください。
secretcode RSXの値はレベル値より大きいか小さいかでなければなりません。100と0ではなく、99.9999と0.0001を使用してみてください。
Mladenさん、ありがとうございました。
よろしくお願いします。
シークレットコード
ムラデンさん、こんにちは。よろしくお願いします。
私はサポートとレジスタンスのブレイクアウトに基づいた独自のインジケータを開発しています。
私はそれがほぼ準備ができているが、私はどこにコードに挿入するか、またはそれをよりよく書くのかわからない32のものがあります。
1.-最初の事は、最初の注文は、別の色、この場合は色のライム、および色の赤で買った後の最初の売りでペイントするために販売した後、購入することである。
2.-指標は、この順序のテキストとポップアップを展開することを確認するには、別の色で "ペア......ロング行く "と "ペア......ショート行く "と言っている。
3.-フラクタルズ・インディケーターの コードを私のコードに組み込んで、すべてが一体となるようにすること。
これは、私が今までに持っている私のインジケータのためのものです。
#property strict
#property indicator_chart_window
#プロパティ indicator_buffers 4
#property indicator_color1 clrLime (インジケータカラー1)
#property indicator_color2 clrRed(インジケーターカラー2・レッド
#プロパティ indicator_color3 clrMagenta
#property indicator_color4 clrCyan (インジケーターカラー4)
#define BUY 1
#define SELL 2
double Buy[],
Sell[],
FirstBuy[],
FirstSell[];
int OnInit() {
SetIndexBuffer(0,FirstBuy)を設定します。
SetIndexBuffer(1,FirstSell)を設定します。
SetIndexBuffer(2,Buy)を設定します。
SetIndexBuffer(3,Sell)を設定します。
for(int i=0; i<4; i++) { {インデックススタイル(1)を設定します。
SetIndexStyle (i,DRAW_ARROW,STYLE_SOLID,2);}を設定します。
SetIndexArrow (0,233)を設定します。
SetIndexArrow (1,234)。
SetIndexArrow (2,233).SetIndexArrow(2,233)。
SetIndexArrow (3,234)。
return(INIT_SUCCEEDED);}.
void OnDeinit(const int reason) {}
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[],
const double &open[]、const double &high[]、const double &low[]。
const double &close[], const long &tick_volume[], const long &volume[],
const int &spread[]) {
静的 int lastSignal=0;
for(int i=MathMin(rates_total-prev_calculated, rates_total-1); i>=0; i--){
FirstBuy=FirstSell=Buy=Sell=EMPTY_VALUEです。
datetime when=Time;
int x=iBarShift(NULL,PERIOD_H1, when),
y=iBarShift(NULL,PERIOD_M15,when)。
z=iBarShift(NULL,PERIOD_M5,when)です。
double srUpH1 = iCustom(NULL,PERIOD_H1, "Support and Resistance (Barry)",0,x)です。
srDownH1 = iCustom(NULL,PERIOD_H1, "Support and Resistance (Barry)",1,x).となります。
MidH1 = (srUpH1+srDownH1)/2,
srUp15M = iCustom(NULL,PERIOD_M15, "Support and Resistance (Barry)",0,y)とします。
srDown15M = iCustom(NULL,PERIOD_M15, "Support and Resistance (Barry)",1,y)です。
Mid15M=(srUp15M+srDown15M)/2.Mid15M=(srUp15M+srDown15M)/2,
srUp5M = iCustom(NULL,PERIOD_M5, "Support and Resistance (Barry)",0,z)です。
srDown5M = iCustom(NULL,PERIOD_M5, "Support and Resistance (Barry)",1,z)です。
Mid5M = (srUp5M+srDown5M)/2,
srUp = iCustom(NULL,0, "Support and Resistance (Barry)",0,i)。
srDown = iCustom(NULL,0, "Support and Resistance (Barry)",1,i).となります。
if(ClosesrUp){。
if(lastSignal==SELL)の場合{。
FirstBuy=Low-_Point。
SoundAlert(when, "Buy");}.
else {
買い=低ポイント; } } else
lastSignal=BUY;}。
if(Close>srUpH1 && Close<srDown) {。
if(lastSignal==BUY)の場合{。
FirstSell=High+_Point。
SoundAlert(when, "Sell");}.
else {
売り=High+_Point; } } else { 売り=High+_Point
lastSignal=SELL;}}となる。
return(rates_total);}
void SoundAlert(datetime i, string dir) { {
static datetime lastAlert=0;
if(lastAlert!=i){。
Alert(StringFormat("%s signal on %s at %s",dir,Symbol(),TimeToStr(i)));
lastAlert=i;}}
これはサポートとレジスタンスのフラクタルのコードですが、どこに入力すればいいのかわかりません。
#プロパティ indicator_buffers 2
#プロパティ indicator_color1 Red
#プロパティ indicator_color2 Blue
//---- buffers
double v1[];
double v2[];
double val1;
double val2;
int i;
int init()
{
IndicatorBuffers(2);
//---- 描画設定
SetIndexArrow(0, 119);
SetIndexArrow(1, 119);
SetIndexStyle(0,DRAW_ARROW,STYLE_DOT,1,Red);
SetIndexDrawBegin(0,i-1);
SetIndexBuffer(0, v1).SetIndexBuffer(2); //---- インデックスバッファの
設定SetIndexArrow(
1); SetIndexArrow(2
); //---- インデックスバッファを設定する。SetIndexLabel(0, "Resistance");
SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1,Blue);
SetIndexDrawBegin(1,i-1);
SetIndexBuffer(1, v2);
SetIndexLabel(1, "Support");
return(0);
}
int start()
{
i=Bars.
Bars.Bars;setIndexDrawBuffer
(2);SetIndexStyle(1
);SetIndexLabel
(1); setIndexDrawBegin(1
)while(i>=0)
{
val1 = iFractals(NULL, 0, MODE_UPPER,i);
if (val1 > 0)
v1=High;
else
v1 = v1;
val2 = iFractals(NULL, 0, MODE_LOWER,i);
if (val2 > 0)
v2=Low;
else
v2 = v2;
i--;
}
return(0);
}}
{val1=H1
, iFractals=H2,if
(
v1>0) v1=H2;
elsev1=H2
; }return(0)
; } } { val1=H1, iFractals=H2//+------------------------------------------------------------------------+
[/TD][
/TR]
こんにちは、Mladenさん。助けてもらえますか?
私はサポートとレジスタンスのブレイクアウトに基づいた独自のインジケータを開発しています。
私はそれがほぼ準備ができているが、私はどこにコードに挿入したり、より良いそれを書くためにわからない32のものです。
1.-最初の事は、最初の注文は、別の色、この場合は色のライム、および色の赤で買った後の最初の売りでペイントするために販売した後、購入することである。
2.-指標は、この順序のテキストとポップアップを展開することを確認するには、別の色で "ペア......ロング行く "と "ペア......ショート行く "と言っている。
3.- フラクタルズ・インディケーターのコードを私のコードに組み込んで、すべてが一体となるようにすること。
これは、私が今までに持っている私のインジケータのためのものです。
#property strict
#property indicator_chart_window
#プロパティ indicator_buffers 4
#property indicator_color1 clrLime (インジケータカラー1)
#property indicator_color2 clrRed(インジケーターカラー2・レッド
#プロパティ indicator_color3 clrMagenta
#property indicator_color4 clrCyan (インジケーターカラー4)
#define BUY 1
#define SELL 2
double Buy[],
Sell[],
FirstBuy[],
FirstSell[];
int OnInit() {
SetIndexBuffer(0,FirstBuy)を設定します。
SetIndexBuffer(1,FirstSell)を設定します。
SetIndexBuffer(2,Buy)を設定します。
SetIndexBuffer(3,Sell)を設定します。
for(int i=0; i<4; i++) { {インデックススタイル(1)を設定します。
SetIndexStyle (i,DRAW_ARROW,STYLE_SOLID,2);}を設定します。
SetIndexArrow (0,233)を設定します。
SetIndexArrow (1,234)。
SetIndexArrow (2,233).SetIndexArrow(2,233)。
SetIndexArrow (3,234)。
return(INIT_SUCCEEDED);}.
void OnDeinit(const int reason) {}
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[],
const double &open[]、const double &high[]、const double &low[]。
const double &close[], const long &tick_volume[], const long &volume[],
const int &spread[]) {
静的 int lastSignal=0;
for(int i=MathMin(rates_total-prev_calculated, rates_total-1); i>=0; i--){
FirstBuy=FirstSell=Buy=Sell=EMPTY_VALUEです。
datetime when=Time;
int x=iBarShift(NULL,PERIOD_H1, when),
y=iBarShift(NULL,PERIOD_M15,when)。
z=iBarShift(NULL,PERIOD_M5,when)です。
double srUpH1 = iCustom(NULL,PERIOD_H1, "Support and Resistance (Barry)",0,x)です。
srDownH1 = iCustom(NULL,PERIOD_H1, "Support and Resistance (Barry)",1,x).となります。
MidH1 = (srUpH1+srDownH1)/2,
srUp15M = iCustom(NULL,PERIOD_M15, "Support and Resistance (Barry)",0,y)とします。
srDown15M = iCustom(NULL,PERIOD_M15, "Support and Resistance (Barry)",1,y)です。
Mid15M=(srUp15M+srDown15M)/2.Mid15M=(srUp15M+srDown15M)/2,
srUp5M = iCustom(NULL,PERIOD_M5, "Support and Resistance (Barry)",0,z)です。
srDown5M = iCustom(NULL,PERIOD_M5, "Support and Resistance (Barry)",1,z)です。
Mid5M = (srUp5M+srDown5M)/2,
srUp = iCustom(NULL,0, "Support and Resistance (Barry)",0,i)。
srDown = iCustom(NULL,0, "Support and Resistance (Barry)",1,i).となります。
if(ClosesrUp){。
if(lastSignal==SELL)の場合{。
FirstBuy=Low-_Point。
SoundAlert(when, "Buy");}.
else {
買い=低ポイント; } } else
lastSignal=BUY;}。
if(Close>srUpH1 && Close<srDown) {。
if(lastSignal==BUY)の場合{。
FirstSell=High+_Point。
SoundAlert(when, "Sell");}.
else {
売り=High+_Point; } } else { 売り=High+_Point
lastSignal=SELL;}}となる。
return(rates_total);}
void SoundAlert(datetime i, string dir) { {
static datetime lastAlert=0;
if(lastAlert!=i){。
Alert(StringFormat("%s signal on %s at %s",dir,Symbol(),TimeToStr(i)));
lastAlert=i;}}
これはサポートとレジスタンスのフラクタルのコードですが、どこに入力すればいいのかわかりません。
#プロパティ indicator_buffers 2
#プロパティ indicator_color1 Red
#プロパティ indicator_color2 Blue
//---- buffers
double v1[];
double v2[];
double val1;
double val2;
int i;
int init()
{
IndicatorBuffers(2);
//---- 描画設定
SetIndexArrow(0, 119);
SetIndexArrow(1, 119);
SetIndexStyle(0,DRAW_ARROW,STYLE_DOT,1,Red);
SetIndexDrawBegin(0,i-1);
SetIndexBuffer(0, v1).SetIndexBuffer(2); //---- インデックスバッファの
設定SetIndexArrow(
1); SetIndexArrow(2
); //---- インデックスバッファを設定する。SetIndexLabel(0, "Resistance");
SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1,Blue);
SetIndexDrawBegin(1,i-1);
SetIndexBuffer(1, v2);
SetIndexLabel(1, "Support");
return(0);
}
int start()
{
i=Bars.
Bars.Bars;setIndexDrawBuffer
(2);SetIndexStyle(1
);SetIndexLabel
(1); setIndexDrawBegin(1
)while(i>=0)
{
val1 = iFractals(NULL, 0, MODE_UPPER,i);
if (val1 > 0)
v1=High;
else
v1 = v1;
val2 = iFractals(NULL, 0, MODE_LOWER,i);
if (val2 > 0)
v2=Low;
else
v2 = v2;
i--;
}
return(0);
}}
{val1=H1
, iFractals=H2,if
(
v1>0) v1=H2;
elsev1=H2
; }return(0)
; } } { val1=H1, iFractals=H2//+------------------------------------------------------------------------+
[/TD][
/TR]
ダニエル1983
ポイント2と3を今更。
2.単にポップアップ警告を持つためにAlert(t "ポップアップウィンドウに使用するテキスト")を追加 します。
3.良いアイデアではありません - コードが複雑になり、何かが間違って動作する可能性が高くなります。
Mladen様
この投稿のように、添付のインジケータに「バンドを追加」することは可能でしょうか :https://www.mql5.com/en/forum/172894/page45
このインディケータはエリートセクションのものですが、バンドを追加する方法が好きです。
よろしくお願いします。
秘密のコード