前提・実現したいこと
MQL4にてボタンスイッチ式のプログラムを作成しています。
OnCalculateの所にiCustomを使い他インジケーターのデーターを取得し表示・非表示できるボタン作成。
発生している問題・エラーメッセージ
動作が重くなってしまいます。
該当のソースコード
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { //--- int limit = rates_total - prev_calculated; for(int i=0; i<limit; i++) { //上矢印 MA1: MA1[i]=iCustom(_Symbol,0,"Increase",3,60,0,5,70,30,AlertI,false,"Low","High",false,"Low","Low","High","High",20,"チェックポイント★リベンジ",11,clrWhite,C'30,130,151',10,155,clrWhite,C'41,174,204',20,180,bsizex,bsizey,1,i); MA2[i]=iCustom(_Symbol,0,"Increase",3,60,0,5,70,30,AlertI,false,"Low","High",false,"Low","Low","High","High",20,"チェックポイント★リベンジ",11,clrWhite,C'30,130,151',10,155,clrWhite,C'41,174,204',20,180,bsizex,bsizey,3,i); //下矢印 MA3[i]=iCustom(_Symbol,0,"Increase",3,60,0,5,70,30,AlertI,false,"Low","High",false,"Low","Low","High","High",20,"チェックポイント★リベンジ",11,clrWhite,C'30,130,151',10,155,clrWhite,C'41,174,204',20,180,bsizex,bsizey,0,i); MA4[i]=iCustom(_Symbol,0,"Increase",3,60,0,5,70,30,AlertI,false,"Low","High",false,"Low","Low","High","High",20,"チェックポイント★リベンジ",11,clrWhite,C'30,130,151',10,155,clrWhite,C'41,174,204',20,180,bsizex,bsizey,2,i); //勝敗 MA6[i]=iCustom(_Symbol,0,"Increase",3,60,0,5,70,30,AlertI,false,"Low","High",false,"Low","Low","High","High",20,"チェックポイント★リベンジ",11,clrWhite,C'30,130,151',10,155,clrWhite,C'41,174,204',20,180,bsizex,bsizey,4,i); MA0[i]=iCustom(_Symbol,0,"Increase",3,60,0,5,70,30,AlertI,false,"Low","High",false,"Low","Low","High","High",20,"チェックポイント★リベンジ",11,clrWhite,C'30,130,151',10,155,clrWhite,C'41,174,204',20,180,bsizex,bsizey,5,i); MA5[i]=iCustom(_Symbol,0,"Increase",3,60,0,5,70,30,AlertI,false,"Low","High",false,"Low","Low","High","High",20,"チェックポイント★リベンジ",11,clrWhite,C'30,130,151',10,155,clrWhite,C'41,174,204',20,180,bsizex,bsizey,6,i); //--- return value of prev_calculated for next call } return(rates_total); }
試したこと
ボタンを押したときだけインジケーターを読み込み反映させることはできるのでしょうか?
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
あなたの回答
tips
プレビュー