other

murata mql4外部パラメータ設定(途中)

#property show_inputs

#include <CustomeFunctions01.mqh>

input int stopLossPips = 30;
extern int takeProfitPips = 40;


//新しい列挙型の作成
enum riskLevel{
   RiskLevel_1,
   RiskLevel_2,
   RiskLevel_3
};

//初期値を割り振った数値で指定
extern riskLevel RiskLevel = RiskLevel_1;


void OnStart(){

Alert(RiskLevel);

if(RiskLevel == RiskLevel_1)
{

string target = "ichidesu";
Alert(target);

}

if(RiskLevel == RiskLevel_2)
{

string target = "2desu";
Alert(target);

}

if(RiskLevel == RiskLevel_3)
{

string target = "3desu";
Alert(target);

}



}
Was this helpful?