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?
Similar Posts