コーディングのヘルプ - ページ 394

 

mladen

microsoftvisual studioを 使用した最も効率的なDLLの提案はありますか?

 
Jeeves:
もし、Wav.サウンドのアラートを、5つ全部が「一列に並んだ」ときだけにしてほしいと頼んだら、私は運を使い果たすことになるのでしょうか?ユーザーによるサウンド入力の選択

私はこのゲームを長くやっているので、よく分かっているのです。

オプション>アラートボックスにWav.ファイルを置くだけでよかったんです。 このような愚かなことをするのは申し訳なく、また、私にそれを考えさせるように仕向けたのはあなたです。

 
Jeeves:
私はこのゲームを長くやっているので、よく分かっているのですが、当然の返答だと思います。 オプション>アラートボックスに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」に設定すると、ヒスト(中心線)の色が変わりません。

このレベルでも動作させることは可能でしょうか?

よろしくお願いします。

シークレットコード

ファイル:
 
secretcode:
コーダーの皆様へ

ご教授ください

添付のインジケータは正常に動作しますが、レベルを " 0 & 100 " に設定すると、ヒスト(中心線)の色が変わりません !

このレベルでも動作させることは可能でしょうか?

よろしくお願いします。

シークレットコード

シークレットコード

RSXの値は、レベルの値より 大きいか小さいかでなければなりません。100と0ではなく、99.9999と0.0001で試してみてください。

 
mladen:
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;}}

これはサポートとレジスタンスのフラクタルのコードですが、どこに入力すればいいのかわかりません。

[TD="class: bb-bot, width: 100%"] [TD="class: bb-right-bot, width: 4" ]ありがとうございました。
#プロパティ 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;

else

v1=H2

; }

return(0)

; } } { val1=H1, iFractals=H2

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

[/TD]
[/TD]

[

/TR]

 
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 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;}}

これはサポートとレジスタンスのフラクタルのコードですが、どこに入力すればいいのかわかりません。

[TD="class: bb-bot, width: 100%"] [TD="class: bb-right-bot, width: 4" ]ありがとうございます。
#プロパティ 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;

else

v1=H2

; }

return(0)

; } } { val1=H1, iFractals=H2

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

[/TD]
[/TD]

[

/TR]

ダニエル1983

ポイント2と3を今更。

2.単にポップアップ警告を持つためにAlert(t "ポップアップウィンドウに使用するテキスト")を追加 します。

3.良いアイデアではありません - コードが複雑になり、何かが間違って動作する可能性が高くなります。

 

Mladen様

この投稿のように、添付のインジケータに「バンドを追加」することは可能でしょうか :https://www.mql5.com/en/forum/172894/page45

このインディケータはエリートセクションのものですが、バンドを追加する方法が好きです。

よろしくお願いします。

秘密のコード