[警告は閉鎖されました!】フォーラムを乱雑にしないために、どんな初心者の質問でも。プロフェッショナルは、通り過ぎないでください。あなたなしでは、どこにも行けない。 - ページ 807

 
granit77:
おそらく、コードの下書きや不完全なものがあるのでしょう。インジケーターはハードワイヤードで、コード内で外部変数は一切使用しない。

ダウンロードしたのは、ほぼ全部です。コーディネートだけを切り取る。
 
Dersu:
ほぼ全部ダウンロードしました。コーディネートだけを切り取る。

何か未完成ですが、こんな感じで動きます。OBVとその平滑化線との差を表示します。何かに影響を与える唯一のパラメータ(スムージングの度合い)を出力し、他に変更するものはありません。

//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Silver
//---- indicator parameters
extern int SignalSMA=10;
//---- indicator buffers
double ind_buffer1[];
double ind_buffer2[];
double ind_buffer3[];
double ind_buffer4[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- 2 additional buffers are used for counting.
IndicatorBuffers(4);
//---- drawing settings
SetIndexStyle(0,DRAW_LINE);
SetIndexDrawBegin(0,SignalSMA);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+2);
//---- 3 indicator buffers mapping
if(!SetIndexBuffer(0,ind_buffer1) &&
!SetIndexBuffer(1,ind_buffer2) &&
!SetIndexBuffer(3,ind_buffer4) &&
!SetIndexBuffer(2,ind_buffer3))
Print("cannot set indicator buffers!");
//---- name for DataWindow and indicator subwindow label
  IndicatorShortName("OBV_M");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Moving Average of Oscillator |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//---- macd counted in the 1-st additional buffer
for(int i=0; i<limit; i++)
ind_buffer2[i]=iOBV(NULL, 0, PRICE_CLOSE, i);
//---- signal line counted in the 2-nd additional buffer
for(i=0; i<limit; i++) {
ind_buffer3[i]=iMAOnArray(ind_buffer2,Bars,SignalSMA,0,MODE_SMA,i);
//ind_buffer4[i]=iMAOnArray(ind_buffer2,Bars,3,0,MODE_SMA,i);
}
//---- main loop
for(i=0; i<limit; i++)
ind_buffer1[i]=ind_buffer2[i]-ind_buffer3[i];
//---- done
return(0);
}
//+------------------------------------------------------------------+
 

granit77さん、ありがとうございます。

そこでパラメータ("OBV_M")を消してしまいました、申し訳ありません。

全般的に状況を理解し、受け入れている。

そして、最初のコメントですべてが明確になりました、知識を得られました、ありがとうございます。

 
チェックしたところ、すべてOKでした。
 

ごきげんよう。

Expertsタブで、「Experts are disabled because the account has been changed」というメッセージが表示されました。

理由はなんでしょう、どなたか遭遇された方はいらっしゃいますか?


それを明確にすることにしたのです。

同じ証券会社の両方の端末で、このメッセージが表示されました。

一つはデモ口座で、もう一つはリアル口座です。

 
端末でアカウントを変更すると、デフォルトでEAがブロックされます。Service-Settings-Advisors-Disable EAs when changing accountのチェックをはずす。
 
ロジャー でも、アカウントは変えていないんだ。
 
同じDCの別の端子を取り付けたことが原因でしょうか?
 
もちろん、Expert Advisorは、市場の近くに注文を配置しようとしている可能性がありますが、なぜ130 エラー - 私はこれを戦うことができる方法ですか?
 
T-G:
ストップはOKなのに、注文を出そうとすると130というエラーが出ることがあるのですが、どうしてでしょうか? もちろん、Expert Advisorがマーケットの近くに注文を出そうとしているのかもしれませんが、なぜ130というエラーが出るのか、どうしたらいいのか、教えてください。
コードを教えてください。そして、エラーを発見するのです...。:)