下の4箇所がコンパイルエラー箇所です。
'iCCI' - wrong parameters count
'iRSI' - wrong parameters count
'iCustom' - wrong parameters count
'iCustom' - wrong parameters count
ここからコード
//---- property
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Magenta
#property indicator_color2 Aqua
//---- input parameters
extern int CCIPeriod = 14;
extern int RSIPeriod = 14;
extern bool Alerts =true;
//---- indicator buffers
double CCI[];
double RSI[];
double BuyArrow[];
double SellArrow[];
//---- indicator parameters
int CCI_Handle;
int RSI_Handle;
//---- initialization function
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,CCI);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,RSI);
SetIndexStyle(2,DRAW_ARROW);
SetIndexArrow(2,159);
SetIndexBuffer(2,BuyArrow);
SetIndexStyle(3,DRAW_ARROW);
SetIndexArrow(3,159);
SetIndexBuffer(3,SellArrow);
//---- indicator handles
CCI_Handle = iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL);
RSI_Handle = iRSI(NULL,0,RSIPeriod,PRICE_CLOSE);
//----
return(0);
}
//---- deinitialization function
int deinit()
{
//----
//----
return(0);
}
//---- calculation function
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;
//---- main loop
for(int i=0; i<limit; i++)
{
//---- get CCI and RSI values
CCI[i] = iCustom(NULL,0,CCI_Handle,i);
RSI[i] = iCustom(NULL,0,RSI_Handle,i);
//---- check for buy signal
if(CCI[i]<90 && CCI[i+1]>90 && RSI[i]<85 && RSI[i+1]>85)
{
BuyArrow[i] = Low[i]-10*Point; // draw buy arrow below low price
if(Alerts) Alert("Buy signal at bar ",i); // send alert message
}
//---- check for sell signal
if(CCI[i]>-90 && CCI[i+1]<-90 && RSI[i]>15 && RSI[i+1]<15)
{
SellArrow[i] = High[i]+10*Point; // draw sell arrow above high price
if(Alerts) Alert("Sell signal at bar ",i); // send alert message
}
}
//----
return(0);
}
No.1ベストアンサー
- 回答日時:
パラメーターの数が足りないからです。
ちゃんとリファレンス・マニュアルを読みましょう。double iCCI(
string symbol, // symbol
int timeframe, // timeframe
int period, // averaging period
int applied_price, // applied price
int shift // shift
);
shift [in] Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
iCCI(NULL,0,CCIPeriod,PRICE_TYPICAL,1)
に
以下同様
https://docs.mql4.com/indicators/icci
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
似たような質問が見つかりました
- C言語・C++・C# バイナリファイルをコピーするのにかかる時間を測りたいのですが実行するとFatel error:gli 2 2022/11/03 01:10
- C言語・C++・C# プログラミングの授業の課題です 1 2023/01/17 22:15
- C言語・C++・C# C言語のエラーについて 2 2022/07/11 13:56
- C言語・C++・C# プログラミング c言語 4 2023/03/07 01:05
- C言語・C++・C# c言語の問題の説明、各所ごとに 5 2023/07/26 11:03
- C言語・C++・C# c言語の問題です 3 2023/01/10 16:15
- C言語・C++・C# C言語 3 2022/11/09 13:27
- C言語・C++・C# C 言語の Gauss Jordan 法について 2 2022/12/28 11:16
- Ruby 【JAVA】数字をひし形に出力するプログラムについて 2 2022/07/11 23:32
- C言語・C++・C# C言語でif文が予想と違う動きをする件について7 4 2023/03/20 00:26
関連するカテゴリからQ&Aを探す
おすすめ情報
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
円安が記録的とニュースでも言...
-
追加証拠金
-
1ドル=155円ってことですか?
-
外国為替
-
ドル円は何円まで行くでしょう...
-
投資信託のその日の終値は、日...
-
トレーダーっていくら利益出て...
-
給与所得と為替利益だけだと、...
-
投資いま下がってますが、 買っ...
-
1ドル155円に迫っています。 こ...
-
セントレア空港内の以下の外貨...
-
このままアメリカのインフレが...
-
証拠金が底を尽きてしまいまし...
-
為替相場の決まり方
-
FXでの借金って、お金は銀行や...
-
円安から円高になるのですか? ...
-
質問です
-
極端な円安、円高のとき、FXで...
-
1ドル154円後半なのになぜ為替...
-
これってなんでこんな値動きを...
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
2回戦止まりは2回戦は勝ってい...
-
mql4のコンパイルエラー箇所の...
-
MT4によるバックテストの信頼性...
-
MT4で時間を指定するにはどのよ...
-
MT4で取引時間を指定する。
-
MT4のEAで通貨ペア毎に最...
-
メタトレーダ4で自動売買をした...
-
【FX】MT4にてプログラムを作成...
-
MT4におけるトレーリングス...
-
MT4 ボリンジャーバンドタッチ...
-
Tera Termが途中で切れるのです...
-
遠藤さくらと言う人が、毎日100...
-
80歳の高齢者ですが、金融庁に...
-
為替データをエクセルにダウン...
-
MT4のHeiken Ashi Smoothedをサ...
-
FXの日足時系列データをダウン...
-
MT5のBIT(売り)ASK(買い)のライ...
-
【MQL4】ZigZagの天底の値の取得
-
MT4 フォワードテストってどう...
-
陽線・陰線が切り替わったらア...
おすすめ情報