int CSignalMACD::ShortCondition(void)
{
int result=0;
int idx =StartIndex();
//--- check direction of the main lineif(DiffMain(idx)<0.0)
{
//--- main line is directed downwards, confirming a possibility of falling of priceif(IS_PATTERN_USAGE(0))
result=m_pattern_0; // "confirming" signal number 0//--- if the model 1 is used, look for a reverse of the main lineif(IS_PATTERN_USAGE(1) && DiffMain(idx+1)>0.0)
result=m_pattern_1; // signal number 1//--- if the model 2 is used, look for an intersection of the main and signal lineif(IS_PATTERN_USAGE(2) && State(idx)<0.0 && State(idx+1)>0.0)
result=m_pattern_2; // signal number 2//--- if the model 3 is used, look for an intersection of the main line and the zero levelif(IS_PATTERN_USAGE(3) && Main(idx)<0.0 && Main(idx+1)>0.0)
result=m_pattern_3; // signal number 3//--- if the models 4 or 5 are used and the main line turned downwards above the zero level, look for divergencesif((IS_PATTERN_USAGE(4) || IS_PATTERN_USAGE(5)) && Main(idx)>0.0)
{
//--- perform the extended analysis of the oscillator state
ExtState(idx);
//--- if the model 4 is used, look for the "divergence" signalif(IS_PATTERN_USAGE(4) && CompareMaps(1,1)) // 0000 0001b
result=m_pattern_4; // signal number 4//--- if the model 5 is used, look for the "double divergence" signalif(IS_PATTERN_USAGE(5) && CompareMaps(0x11,2)) // 0001 0001breturn(m_pattern_5); // signal number 5
}
}
//--- return the resultreturn(result);
}
在 #include <Expert\Signal\SignalMACD.mqh> SignalMACD.mqh 文件 里
发现 IS_PATTERN_USAGE 是 红色的 ,说明 是个内置 枚举 ,但 说明 书里 找 不到
是 什么意思