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

 

すべての人におはようございます。

私はこの指標の多くのバージョンを見てきましたし、赤いろうそく私は決して表示されない、エラーを修正することができますか?

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

#プロパティindicator_separate_window

#プロパティindicator_buffers 2

#property indicator_color1 LimeGreen

#property indicator_color2 Red(インジケーターカラー2 レッド

//----インジケータ・バッファ

double ind_buffer1[];

double ind_buffer2[];

double ind_buffer3[];

//----

double CB = 0, valueh1 = 0, valuel = 0, valueh = 0, value = 0, price = 0, hi = 1, lo = 1;

double resh = 0, resl = 0, deltah = 0, deltal = 0;

int CurrentBar=0;

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

//| カスタムインジケータ初期化関数

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

int init()

{

//---- カウントに使用するバッファを1つ追加。

IndicatorBuffers(3);

//---- 描画の設定

SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2);

SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2); //SetIndexStyle(2)を設定します。

IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS) + 1);

SetIndexDrawBegin(0, 34).SetIndexDrawBegin(0)です。

SetIndexDrawBegin(1, 34);

//---- 3つの指標バッファのマッピング

if(!SetIndexBuffer(0, ind_buffer1) &&)

!SetIndexBuffer(1, ind_buffer2) && (ind_buffer2)の場合。

!SetIndexBuffer(2、ind_buffer3))

Print("cannot set indicator buffers!");

//DataWindowとインジケータサブウィンドウのラベルに名前を付けます。

IndicatorShortName("DeltaForce");

SetIndexLabel(0, "DF1");

SetIndexLabel(1, "DF2")。

//---- 初期化完了

return(0);

}

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

//| デルタフォース

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

int start()

{

for(CB = 0 ; CB <= Bars ; CB++)

{

CurrentBar = Bars - CB;

if(クローズ[CurrentBar] > クローズ[CurrentBar+1])

{

resl = 0;

if(resh == 0)

deltah = 0;

deltah = deltah + (Close[CurrentBar] - Close[CurrentBar+1]);

// valueh = High[CurrentBar];

resh= 1;

}

if(resh == 0)

deltah = 0;

ind_buffer1[CurrentBar] = deltah;

if(Close[CurrentBar](現在値) < Close[CurrentBar+1](現在値) )

{

resh = 0;

if(resl == 0)

deltal = 0;

deltal = deltal + (Close[CurrentBar+1] - Close[CurrentBar])。

//valuel = Low[CurrentBar];

resl= 1;

}

if(resl == 0 )

deltal=0;

ind_buffer2[CurrentBar]=deltal。

}

//----完了

return(0);

}

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

 
rookiespain:
皆さん、おはようございます。

私はこの指標と赤いろうそくの多くのバージョンを見てきました私は決して表示されない、エラーを修正することができますか?

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

#プロパティindicator_separate_window

#プロパティindicator_buffers 2

#property indicator_color1 LimeGreen

#property indicator_color2 Red(インジケーターカラー2 レッド

//---- インジケータ・バッファ

double ind_buffer1[];

double ind_buffer2[];

double ind_buffer3[];

//----

double CB = 0, valueh1 = 0, valuel = 0, valueh = 0, value = 0, price = 0, hi = 1, lo = 1;

double resh = 0, resl = 0, deltah = 0, deltal = 0;

int CurrentBar=0;

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

//| カスタムインジケータ初期化関数

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

int init()

{

//---- カウントに使用するバッファを1つ追加。

IndicatorBuffers(3);

//---- 描画の設定

SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2);

SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2); //SetIndexStyle(2)を設定します。

IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS) + 1);

SetIndexDrawBegin(0, 34).SetIndexDrawBegin(0)です。

SetIndexDrawBegin(1, 34);

//---- 3つの指標バッファのマッピング

if(!SetIndexBuffer(0, ind_buffer1) &&)

!SetIndexBuffer(1, ind_buffer2) && (ind_buffer2)の場合。

!SetIndexBuffer(2、ind_buffer3))

Print("cannot set indicator buffers!");

//DataWindowとインジケータサブウィンドウのラベルに名前を付けます。

IndicatorShortName("DeltaForce");

SetIndexLabel(0, "DF1");

SetIndexLabel(1, "DF2")。

//---- 初期化完了

return(0);

}

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

//| デルタフォース

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

int start()

{

for(CB = 0 ; CB <= Bars ; CB++)

{

CurrentBar = Bars - CB;

if(クローズ[CurrentBar] > クローズ[CurrentBar+1])

{

resl = 0;

if(resh == 0)

deltah = 0;

deltah = deltah + (Close[CurrentBar] - Close[CurrentBar+1]);

// valueh = High[CurrentBar];

resh= 1;

}

if(resh == 0)

deltah = 0;

ind_buffer1[CurrentBar] = deltah;

if(Close[CurrentBar](現在値) < Close[CurrentBar+1](現在値) )

{

resh = 0;

if(resl == 0)

deltal = 0;

deltal = deltal + (Close[CurrentBar+1] - Close[CurrentBar])。

//valuel = Low[CurrentBar];

resl= 1;

}

if(resl == 0 )

deltal=0;

ind_buffer2[CurrentBar]=deltal。

}

//----完了

return(0);

}

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

今すぐ試してみる :_test.mq4

ファイル:
_test.mq4  3 kb
test.gif  68 kb
 
Big Be:
Stanwellです。

写真を2枚ほど掲載すると、より効果的です。

Big Be

こんにちは、Big Beです。

いい指摘ですね、明日にでもチャートをアップします。

乾杯。

スタン

 

手動でマークしたAUDのチャートはこちらです。 赤いボックスは重なっているバーです。 左の四角は3本しか入っていないので、定義に当てはまりません。 しかし、この足が重要であれば、例えば6 X ATRより大きければ、私はそれらをスイングとして数えますが(ただ、3本のバーだけでは取引しにくい)、この要件はコーディングを複雑にすると思ったので、当面は省くことができます。

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

Stan

ファイル:
 

こんにちは、MladenとMrtoolsです。

このインジケーターに視覚的、音響的なアラートを追加することができますか?

よろしくお願いします。

ファイル:
 

MLADENさん、おはようございます。

どうもありがとうございました、彼らの_testを試してみましたが、右が表示されます。

その優位性は、ProRealTime / VISUALCHARTではい私はより多くを助けることができる、私よりもはるかにですが、私は、ここで持っている任意のヘルプ。

よろしくお願いします。

 

こんにちは。

あるインジケータを使用していて、バーの計算を 制限したいのですが、どうすればいいですか?

元のコードは

int start()

{

int counted_bars=IndicatorCounted();

if(counted_bars<0) return(-1);

if(counted_bars>0) counted_bars--;

int limit = MathMin(Bars-counted_bars,Bars-1);[/CODE]

i changed it with this:

[CODE]int start()

{

int counted_bars=IndicatorCounted();

if(counted_bars<0) return(-1);

if(counted_bars>0) counted_bars--;

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

これは正しいのでしょうか?インジケータは正常に動作しているようですが、私は本当に私がバーの計算を制限しているかどうか疑問に思っています。

 
thefxpros:
こんにちは。

あるインジケータを使用していて、バーの計算を制限したいのですが、どうすればよいですか?

元のコードは

int start()

{

int counted_bars=IndicatorCounted();

if(counted_bars<0) return(-1);

if(counted_bars>0) counted_bars--;

int limit = MathMin(Bars-counted_bars,Bars-1);[/CODE]

i changed it with this:

[CODE]int start()

{

int counted_bars=IndicatorCounted();

if(counted_bars<0) return(-1);

if(counted_bars>0) counted_bars--;

int limit = MathMin(NBars-counted_bars,NBars-1);
これで良いのでしょうか?インジケータは正常に動作しているようですが、本当にバーの計算を制限しているのか疑問があります。

thefxpros

いいえ、それは次のようになります。

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

しかし、その場合には、常にNBarsが常に> 0であることを確認する必要があります。

 

こんにちは、MLADENです。

X軸とY軸を追加して、コーナーに配置することができます。

そして、フォントサイズを 調整することができます。

X2014-PIPSv2

thx a lot.

ファイル:
 
blueface:
こんにちは mladen

X軸とY軸を追加して、コーナーに配置することができます。

そして、フォントサイズを調整することができます。

!X2014-PIPSv2

どうもありがとうございます。

ブルーフェイス

posXとposYという変数があります。