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

 
mladen:
すべての残りの部分(MetQuotesIDと残り)がOKに設定されている場合、必要なのはSendNotificaton()であり、それが動作するはずです

行為が、それぞれの新しいろうそくのために...信号 "プッシュsmartfon "唯一の信号インジケータであること。オフコードエラー - しかし、どこに?

 
popej30:
行為、しかし、それぞれの新しいキャンドルのために...信号 "プッシュsmartfon "唯一の信号インジケータであること。オフコードエラー - しかし、どこに?

SendEmail()を見つけ、その行の直後に配置します。

 
mladen:
SendEmail()を探して、その行のすぐ後に置きます。

スーパー、作業...ありがとうございます

 

アイテムの矢印を変更するコードはどこで改善されますか?

int deinit()

{

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

for (int i = ObjectsTotal()-1; i >= 0; i--)

if (StringSubstr(ObjectName(i), 0, StringLen(PREFIX)) == PREFIX)

ObjectDelete(ObjectName(i));

return(0);

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

}

int init()

{

IndicatorBuffers(8);

SetIndexStyle(0,DRAW_LINE);

SetIndexBuffer(0,SmthBulls);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(1,SmthBears);

SetIndexStyle(2,DRAW_LINE);

SetIndexBuffer(2,SigBulls);

SetIndexStyle(3,DRAW_LINE);

SetIndexBuffer(3,SigBears);

SetIndexBuffer(4,Bulls);

SetIndexBuffer(5,Bears);

SetIndexBuffer(6,AvgBulls);

SetIndexBuffer(7,AvgBears);

string short_name="Bolero Ravel("+Mode+","+Length+","+Smooth+","+Signal+",,"+ModeMA+")";

IndicatorShortName(short_name);

SetIndexLabel(0,"Bulls");

SetIndexLabel(1,"Bears");

SetIndexLabel(2,"SignalBulls");

SetIndexLabel(3,"SignalBears");

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

SetIndexDrawBegin(0,Length+Smooth+Signal);

SetIndexDrawBegin(1,Length+Smooth+Signal);

SetIndexDrawBegin(2,Length+Smooth+Signal);

SetIndexDrawBegin(3,Length+Smooth+Signal);

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

return(0);

}

int start()

{

int i, shift, limit, counted_bars=IndicatorCounted();

double Price1, Price2, smax, smin;

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

if ( counted_bars ==0 ) limit=Bars-Length+Smooth+Signal-1;

if ( counted_bars < 1 )

for(i=1;i<Length+Smooth+Signal;i++)

{

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

Bulls=0;

Bears=0;

AvgBulls=0;

AvgBears=0;

SmthBulls=0;

SmthBears=0;

SigBulls=0;

SigBears=0;

}

if(counted_bars>0) limit=Bars-counted_bars;

limit--;

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

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

{

Price1 = iMA(NULL,0,1,0,0,Price,shift);

Price2 = iMA(NULL,0,1,0,0,Price,shift+1);

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

if (Mode==0)

{

Bulls[shift] = 0.5*(MathAbs(Price1-Price2)+(Price1-Price2));

Bears[shift] = 0.5*(MathAbs(Price1-Price2)-(Price1-Price2));

}

if (Mode==1)

{

smax=High;

smin=Low[Lowest(NULL,0,MODE_LOW,Length,shift)];

Bulls[shift] = Price1 - smin;

Bears[shift] = smax - Price1;

}

if (Mode==2)

{

Bulls[shift] = 0.5*(MathAbs(High[shift]-High[shift-2])+(High[shift]-High[shift-2]));

Bears[shift] = 0.5*(MathAbs(Low[shift-1]-Low[shift])+(Low[shift-1]-Low[shift]));

}

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

}

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

{

AvgBulls[shift]=iMAOnArray(Bulls,0,Length,0,ModeMA,shift);

AvgBears[shift]=iMAOnArray(Bears,0,Length,0,ModeMA,shift);

}

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

{

SmthBulls[shift]=iMAOnArray(AvgBulls,0,Smooth,0,ModeMA,shift);

SmthBears[shift]=iMAOnArray(AvgBears,0,Smooth,0,ModeMA,shift);

}

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

{

if (OverBought > 0 && OverSold > 0 )

{

SigBulls[shift]=OverBought/100*(SmthBulls[shift]+SmthBears[shift]);

SigBears[shift]=OverSold/100*(SmthBulls[shift]+SmthBears[shift]);

}

else

{

SigBulls[shift]=iMAOnArray(SmthBulls,0,Signal,0,ModeMA,shift);

SigBears[shift]=iMAOnArray(SmthBears,0,Signal,0,ModeMA,shift);

}

}

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

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

{

if(SmthBullsSmthBears)

arrows_wind(i,"Up",Arr_otstup ,242,Red,Arr_width,false); //! ! ! !

else ObjectDelete(PREFIX+"Up"+TimeToStr(Time,TIME_DATE|TIME_SECONDS));

if(SmthBulls>SmthBears && SmthBulls<SmthBears)

arrows_wind(i,"Dn",Arr_otstup ,241,Aqua,Arr_width,true); //! ! ! !

else ObjectDelete(PREFIX + "Dn" +TimeToStr(Time,TIME_DATE|TIME_SECONDS));

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

ファイル:
vvv.jpg  95 kb
 
popej30:
アイテムの矢印を変更するためのコードを改善するには?
int deinit()

{

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

for (int i = ObjectsTotal()-1; i >= 0; i--)

if (StringSubstr(ObjectName(i), 0, StringLen(PREFIX)) == PREFIX)

ObjectDelete(ObjectName(i));

return(0);

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

}

int init()

{

IndicatorBuffers(8);

SetIndexStyle(0,DRAW_LINE);

SetIndexBuffer(0,SmthBulls);

SetIndexStyle(1,DRAW_LINE);

SetIndexBuffer(1,SmthBears);

SetIndexStyle(2,DRAW_LINE);

SetIndexBuffer(2,SigBulls);

SetIndexStyle(3,DRAW_LINE);

SetIndexBuffer(3,SigBears);

SetIndexBuffer(4,Bulls);

SetIndexBuffer(5,Bears);

SetIndexBuffer(6,AvgBulls);

SetIndexBuffer(7,AvgBears);

string short_name="Bolero Ravel("+Mode+","+Length+","+Smooth+","+Signal+",,"+ModeMA+")";

IndicatorShortName(short_name);

SetIndexLabel(0,"Bulls");

SetIndexLabel(1,"Bears");

SetIndexLabel(2,"SignalBulls");

SetIndexLabel(3,"SignalBears");

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

SetIndexDrawBegin(0,Length+Smooth+Signal);

SetIndexDrawBegin(1,Length+Smooth+Signal);

SetIndexDrawBegin(2,Length+Smooth+Signal);

SetIndexDrawBegin(3,Length+Smooth+Signal);

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

return(0);

}

int start()

{

int i, shift, limit, counted_bars=IndicatorCounted();

double Price1, Price2, smax, smin;

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

if ( counted_bars ==0 ) limit=Bars-Length+Smooth+Signal-1;

if ( counted_bars < 1 )

for(i=1;i<Length+Smooth+Signal;i++)

{

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

Bulls=0;

Bears=0;

AvgBulls=0;

AvgBears=0;

SmthBulls=0;

SmthBears=0;

SigBulls=0;

SigBears=0;

}

if(counted_bars>0) limit=Bars-counted_bars;

limit--;

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

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

{

Price1 = iMA(NULL,0,1,0,0,Price,shift);

Price2 = iMA(NULL,0,1,0,0,Price,shift+1);

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

if (Mode==0)

{

Bulls[shift] = 0.5*(MathAbs(Price1-Price2)+(Price1-Price2));

Bears[shift] = 0.5*(MathAbs(Price1-Price2)-(Price1-Price2));

}

if (Mode==1)

{

smax=High;

smin=Low[Lowest(NULL,0,MODE_LOW,Length,shift)];

Bulls[shift] = Price1 - smin;

Bears[shift] = smax - Price1;

}

if (Mode==2)

{

Bulls[shift] = 0.5*(MathAbs(High[shift]-High[shift-2])+(High[shift]-High[shift-2]));

Bears[shift] = 0.5*(MathAbs(Low[shift-1]-Low[shift])+(Low[shift-1]-Low[shift]));

}

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

}

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

{

AvgBulls[shift]=iMAOnArray(Bulls,0,Length,0,ModeMA,shift);

AvgBears[shift]=iMAOnArray(Bears,0,Length,0,ModeMA,shift);

}

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

{

SmthBulls[shift]=iMAOnArray(AvgBulls,0,Smooth,0,ModeMA,shift);

SmthBears[shift]=iMAOnArray(AvgBears,0,Smooth,0,ModeMA,shift);

}

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

{

if (OverBought > 0 && OverSold > 0 )

{

SigBulls[shift]=OverBought/100*(SmthBulls[shift]+SmthBears[shift]);

SigBears[shift]=OverSold/100*(SmthBulls[shift]+SmthBears[shift]);

}

else

{

SigBulls[shift]=iMAOnArray(SmthBulls,0,Signal,0,ModeMA,shift);

SigBears[shift]=iMAOnArray(SmthBears,0,Signal,0,ModeMA,shift);

}

}

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

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

{

if(SmthBullsSmthBears)

arrows_wind(i,"Up",Arr_otstup ,242,Red,Arr_width,false); //! ! ! !

else ObjectDelete(PREFIX+"Up"+TimeToStr(Time,TIME_DATE|TIME_SECONDS));

if(SmthBulls>SmthBears && SmthBulls<SmthBears)

arrows_wind(i,"Dn",Arr_otstup ,241,Aqua,Arr_width,true); //! ! ! !

else ObjectDelete(PREFIX + "Dn" +TimeToStr(Time,TIME_DATE|TIME_SECONDS));

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

コード全体が掲載されていないので、forex tsdのコードが変更されていると仮定します(関数の パラメータを見れば一目瞭然です)。

その場合

arrows_wind(i,"Up",Arr_otstup,242,Red,Arr_width,false);

は、次のように置き換える必要があります。

arrows_wind(i,"Up",Arr_otstup,242,Red,Arr_width,true);

そして

arrows_wind(i,"Dn",Arr_otstup,241,Aqua,Arr_width,true) に置き換えます。

arrows_wind(i,"Dn",Arr_otstup,241,Aqua,Arr_width,false) のようになります。

 

こんにちは、ガイさん。

これが可能かどうかわかりませんが、もし誰かができるとすれば、それはあなたでしょう。

添付のインジケータをチャートの下にヒストグラムで表示するようにコーディングしていただけませんか?

私は生まれも育ちもヒストグラムの男なのです

良い週末をお過ごしください。

ファイル:
 
Jeeves:
こんにちは、Guy。

これが可能かどうかはわかりませんが、もしできる人がいるとすれば、それはあなたでしょう。

添付のインジケータをチャートの下にヒストグラムとして表示するようにコーディングしていただけませんか?

私は生まれも育ちもヒストグラムマンなのです

良い週末をお過ごしください。

ジーヴス

そのようなことができるかどうかはわかりません。確認して みます。

 

ありがとうございます。

 

もし、それが無理なら、下の添付ファイルなら可能かもしれません。 そうすれば、同じ結果が表示されると思います。ただ、違う方法で。

MAクロス・インジケータのインスタンスを3つチャートに配置しなければなりませんが...完璧なものはありません!

ファイル:
 
Jeeves:
もし、それが無理なら、下の添付のようなものでも良いかもしれません。 そうすれば、同じ結果が表示されると思います。MAクロスのインジケータを3つチャート上に配置しなければなりませんが・・・。

ジーヴス

私が見る限り、このバージョンは問題なく動作しています。私は正しいでしょうか?