下の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ドル360円の時代があ...
-
為替介入とTTSレート
-
為替相場の決まり方
-
80歳の高齢者ですが、金融庁に...
-
5月FOMCで金利は下がるのか?
-
情報商材はなぜ高いのですか? ...
-
外国為替市場への介入について...
-
株とFXどちらがいいでしょうか...
-
為替介入ですが、予告発表とか...
-
為替介入とはどういう法令にの...
-
外国為替
-
給与所得と為替利益だけだと、...
-
1ドル300円まで行きますか?
-
ドル円の適正相場を皆さんはど...
-
FX エントリーするとレンジにな...
-
なぜ国内FX会社は事業を続けら...
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
2回戦止まりは2回戦は勝ってい...
-
MT4で時間を指定するにはどのよ...
-
mql4のコンパイルエラー箇所の...
-
マネパのストップ(逆指値)の...
-
MT4によるバックテストの信頼性...
-
豊島久道著「FXメタトレーダ...
-
MT4(メタトレーダー)で単純...
-
メタトレーダーでCloseがある値...
-
MT4で取引時間を指定する。
-
Tera Termが途中で切れるのです...
-
80歳の高齢者ですが、金融庁に...
-
MT5のBIT(売り)ASK(買い)のライ...
-
為替データをエクセルにダウン...
-
陽線・陰線が切り替わったらア...
-
ダウ理論の転換に関するインジ...
-
MT4サブウインドウの移動線のク...
-
【MQL4】ZigZagの天底の値の取得
-
mt4のテスターが遅すぎる。
-
FXの日足時系列データをダウン...
-
自動売買(システムトレード)を...
おすすめ情報