//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void SetSignals(Signal &signalList[])
{
int i=0;
ArrayResize(signalList,2*strategiesCount);
HideTestIndicators(true);
/*STRATEGY CODE {"properties":{"entryLots":1,"stopLoss":13,"takeProfit":30,"useStopLoss":true,"useTakeProfit":true,"isTrailingStop":false},"openFilters":[{"name":"RVI Signal","listIndexes":[1,0,0,0,0],"numValues":[32,0,0,0,0,0]},{"name":"Stochastic","listIndexes":[1,0,0,0,0],"numValues":[20,13,10,20,0,0]},{"name":"Envelopes","listIndexes":[2,3,0,0,0],"numValues":[40,0.32,0,0,0,0]}],"closeFilters":[{"name":"DeMarker","listIndexes":[3,0,0,0,0],"numValues":[12,0.13,0,0,0,0]}]} */
signalList[i++] = GetExitSignal_00();
signalList[i++] = GetEntrySignal_00();
/*STRATEGY CODE {"properties":{"entryLots":1,"stopLoss":24,"takeProfit":40,"useStopLoss":true,"useTakeProfit":true,"isTrailingStop":false},"openFilters":[{"name":"Envelopes","listIndexes":[4,3,0,0,0],"numValues":[21,0.85,0,0,0,0]}],"closeFilters":[{"name":"Force Index","listIndexes":[1,0,0,0,0],"numValues":[32,0,0,0,0,0]},{"name":"Williams' Percent Range","listIndexes":[7,0,0,0,0],"numValues":[44,-20,0,0,0,0]},{"name":"Alligator","listIndexes":[1,3,4,0,0],"numValues":[24,23,23,11,11,3]},{"name":"Williams' Percent Range","listIndexes":[0,0,0,0,0],"numValues":[11,-20,0,0,0,0]}]} */
signalList[i++] = GetExitSignal_01();
signalList[i++] = GetEntrySignal_01();
/*STRATEGY CODE {"properties":{"entryLots":1,"stopLoss":12,"takeProfit":21,"useStopLoss":true,"useTakeProfit":true,"isTrailingStop":false},"openFilters":[{"name":"RSI","listIndexes":[4,3,0,0,0],"numValues":[42,47,0,0,0,0]},{"name":"Bollinger Bands","listIndexes":[5,3,0,0,0],"numValues":[37,3.05,0,0,0,0]}],"closeFilters":[{"name":"Moving Average","listIndexes":[1,0,3,0,0],"numValues":[35,0,0,0,0,0]},{"name":"DeMarker","listIndexes":[6,0,0,0,0],"numValues":[48,0,0,0,0,0]},{"name":"RVI Signal","listIndexes":[2,0,0,0,0],"numValues":[18,0,0,0,0,0]}]} */
signalList[i++] = GetExitSignal_02();
signalList[i++] = GetEntrySignal_02();
/*STRATEGY CODE {"properties":{"entryLots":1,"stopLoss":23,"takeProfit":21,"useStopLoss":true,"useTakeProfit":true,"isTrailingStop":false},"openFilters":[{"name":"Money Flow Index","listIndexes":[4,0,0,0,0],"numValues":[21,20,0,0,0,0]},{"name":"RVI","listIndexes":[0,0,0,0,0],"numValues":[23,0,0,0,0,0]},{"name":"Money Flow Index","listIndexes":[1,0,0,0,0],"numValues":[14,20,0,0,0,0]}],"closeFilters":[{"name":"Envelopes","listIndexes":[2,3,0,0,0],"numValues":[23,0.66,0,0,0,0]}]} */
signalList[i++] = GetExitSignal_03();
signalList[i++] = GetEntrySignal_03();
/*STRATEGY CODE {"properties":{"entryLots":1,"stopLoss":14,"takeProfit":26,"useStopLoss":true,"useTakeProfit":true,"isTrailingStop":false},"openFilters":[{"name":"Awesome Oscillator","listIndexes":[4,0,0,0,0],"numValues":[0,0,0,0,0,0]},{"name":"Awesome Oscillator","listIndexes":[6,0,0,0,0],"numValues":[0,0,0,0,0,0]}],"closeFilters":[{"name":"Accelerator Oscillator","listIndexes":[3,0,0,0,0],"numValues":[0,0,0,0,0,0]}]} */
signalList[i++] = GetExitSignal_04();
signalList[i++] = GetEntrySignal_04();
HideTestIndicators(false);
if(i!=2*strategiesCount)
ArrayResize(signalList,i);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
if(Pair==EURUSD)
Signal GetEntrySignal_00()
{
double ind0val1 = iRVI(NULL,0,32,MODE_MAIN,1) - iRVI(NULL,0,32,MODE_SIGNAL,1);
double ind0val2 = iRVI(NULL,0,32,MODE_MAIN,2) - iRVI(NULL,0,32,MODE_SIGNAL,2);
bool ind0long = ind0val1 < 0 - sigma && ind0val2 > 0 + sigma;
bool ind0short = ind0val1 > 0 + sigma && ind0val2 < 0 - sigma;
double ind1val1 = iStochastic(NULL,0,20,13,10,MODE_SMA,STO_LOWHIGH,MODE_MAIN,1);
double ind1val2 = iStochastic(NULL,0,20,13,10,MODE_SMA,STO_LOWHIGH,MODE_MAIN,2);
bool ind1long = ind1val1 < ind1val2 - sigma;
bool ind1short = ind1val1 > ind1val2 + sigma;
double ind2upBand1 = iEnvelopes(NULL,0,40,MODE_SMA,0,PRICE_CLOSE,0.32,MODE_UPPER,1);
double ind2dnBand1 = iEnvelopes(NULL,0,40,MODE_SMA,0,PRICE_CLOSE,0.32,MODE_LOWER,1);
double ind2upBand2 = iEnvelopes(NULL,0,40,MODE_SMA,0,PRICE_CLOSE,0.32,MODE_UPPER,2);
double ind2dnBand2 = iEnvelopes(NULL,0,40,MODE_SMA,0,PRICE_CLOSE,0.32,MODE_LOWER,2);
bool ind2long = Open(0) < ind2upBand1 - sigma && Open(1) > ind2upBand2 + sigma;
bool ind2short = Open(0) > ind2dnBand1 + sigma && Open(1) < ind2dnBand2 - sigma;
Signal signal = CreateEntrySignal(0, ind0long && ind1long && ind2long, ind0short && ind1short && ind2short, 13, 30, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_00()
{
double ind3val1 = iDeMarker(NULL,0,12,1);
bool ind3long = ind3val1 < 0.13 - sigma;
bool ind3short = ind3val1 > 1 - 0.13 + sigma;
Signal signal = CreateExitSignal(0, ind3long, ind3short, 13, 30, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetEntrySignal_01()
{
double ind0upBand1 = iEnvelopes(NULL,0,21,MODE_SMA,0,PRICE_CLOSE,0.85,MODE_UPPER,1);
double ind0dnBand1 = iEnvelopes(NULL,0,21,MODE_SMA,0,PRICE_CLOSE,0.85,MODE_LOWER,1);
double ind0upBand2 = iEnvelopes(NULL,0,21,MODE_SMA,0,PRICE_CLOSE,0.85,MODE_UPPER,2);
double ind0dnBand2 = iEnvelopes(NULL,0,21,MODE_SMA,0,PRICE_CLOSE,0.85,MODE_LOWER,2);
bool ind0long = Open(0) < ind0dnBand1 - sigma && Open(1) > ind0dnBand2 + sigma;
bool ind0short = Open(0) > ind0upBand1 + sigma && Open(1) < ind0upBand2 - sigma;
Signal signal = CreateEntrySignal(1, ind0long, ind0short, 24, 40, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_01()
{
double ind1val1 = iForce(NULL,0,32,MODE_SMA,PRICE_CLOSE,1);
double ind1val2 = iForce(NULL,0,32,MODE_SMA,PRICE_CLOSE,2);
bool ind1long = ind1val1 < ind1val2 - sigma;
bool ind1short = ind1val1 > ind1val2 + sigma;
double ind2val1 = iWPR(NULL,0,44,1);
double ind2val2 = iWPR(NULL,0,44,2);
double ind2val3 = iWPR(NULL,0,44,3);
bool ind2long = ind2val1 < ind2val2 - sigma && ind2val2 > ind2val3 + sigma;
bool ind2short = ind2val1 > ind2val2 + sigma && ind2val2 < ind2val3 - sigma;
double ind3val1 = iAlligator(NULL,0,24,23,23,11,11,3,MODE_SMMA,PRICE_MEDIAN,MODE_GATORLIPS,1);
double ind3val2 = iAlligator(NULL,0,24,23,23,11,11,3,MODE_SMMA,PRICE_MEDIAN,MODE_GATORLIPS,2);
bool ind3long = ind3val1 < ind3val2 - sigma;
bool ind3short = ind3val1 > ind3val2 + sigma;
double ind4val1 = iWPR(NULL,0,11,1);
double ind4val2 = iWPR(NULL,0,11,2);
bool ind4long = ind4val1 > ind4val2 + sigma;
bool ind4short = ind4val1 < ind4val2 - sigma;
Signal signal = CreateExitSignal(1, true, true, 24, 40, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetEntrySignal_02()
{
double ind0val1 = iRSI(NULL,0,42,PRICE_CLOSE,1);
double ind0val2 = iRSI(NULL,0,42,PRICE_CLOSE,2);
bool ind0long = ind0val1 > 47 + sigma && ind0val2 < 47 - sigma;
bool ind0short = ind0val1 < 100 - 47 - sigma && ind0val2 > 100 - 47 + sigma;
double ind1upBand1 = iBands(NULL,0,37,3.05,0,PRICE_CLOSE,MODE_UPPER,1);
double ind1dnBand1 = iBands(NULL,0,37,3.05,0,PRICE_CLOSE,MODE_LOWER,1);
double ind1upBand2 = iBands(NULL,0,37,3.05,0,PRICE_CLOSE,MODE_UPPER,2);
double ind1dnBand2 = iBands(NULL,0,37,3.05,0,PRICE_CLOSE,MODE_LOWER,2);
bool ind1long = Open(0) > ind1dnBand1 + sigma && Open(1) < ind1dnBand2 - sigma;
bool ind1short = Open(0) < ind1upBand1 - sigma && Open(1) > ind1upBand2 + sigma;
Signal signal = CreateEntrySignal(2, ind0long && ind1long, ind0short && ind1short, 12, 21, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_02()
{
double ind2val1 = iMA(NULL,0,35,0,MODE_SMA,PRICE_CLOSE,1);
double ind2val2 = iMA(NULL,0,35,0,MODE_SMA,PRICE_CLOSE,2);
bool ind2long = ind2val1 < ind2val2 - sigma;
bool ind2short = ind2val1 > ind2val2 + sigma;
double ind3val1 = iDeMarker(NULL,0,48,1);
double ind3val2 = iDeMarker(NULL,0,48,2);
double ind3val3 = iDeMarker(NULL,0,48,3);
bool ind3long = ind3val1 > ind3val2 + sigma && ind3val2 < ind3val3 - sigma;
bool ind3short = ind3val1 < ind3val2 - sigma && ind3val2 > ind3val3 + sigma;
double ind4val1 = iRVI(NULL,0,18,MODE_MAIN,1) - iRVI(NULL,0,18,MODE_SIGNAL,1);
bool ind4long = ind4val1 > 0 + sigma;
bool ind4short = ind4val1 < 0 - sigma;
Signal signal = CreateExitSignal(2, true, true, 12, 21, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetEntrySignal_03()
{
double ind0val1 = iMFI(NULL,0,21,1);
double ind0val2 = iMFI(NULL,0,21,2);
bool ind0long = ind0val1 > 20 + sigma && ind0val2 < 20 - sigma;
bool ind0short = ind0val1 < 100 - 20 - sigma && ind0val2 > 100 - 20 + sigma;
double ind1val1 = iRVI(NULL,0,23,MODE_MAIN,1);
double ind1val2 = iRVI(NULL,0,23,MODE_MAIN,2);
bool ind1long = ind1val1 > ind1val2 + sigma;
bool ind1short = ind1val1 < ind1val2 - sigma;
double ind2val1 = iMFI(NULL,0,14,1);
double ind2val2 = iMFI(NULL,0,14,2);
bool ind2long = ind2val1 < ind2val2 - sigma;
bool ind2short = ind2val1 > ind2val2 + sigma;
Signal signal = CreateEntrySignal(3, ind0long && ind1long && ind2long, ind0short && ind1short && ind2short, 23, 21, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_03()
{
double ind3upBand1 = iEnvelopes(NULL,0,23,MODE_SMA,0,PRICE_CLOSE,0.66,MODE_UPPER,1);
double ind3dnBand1 = iEnvelopes(NULL,0,23,MODE_SMA,0,PRICE_CLOSE,0.66,MODE_LOWER,1);
double ind3upBand2 = iEnvelopes(NULL,0,23,MODE_SMA,0,PRICE_CLOSE,0.66,MODE_UPPER,2);
double ind3dnBand2 = iEnvelopes(NULL,0,23,MODE_SMA,0,PRICE_CLOSE,0.66,MODE_LOWER,2);
bool ind3long = Open(0) < ind3upBand1 - sigma && Open(1) > ind3upBand2 + sigma;
bool ind3short = Open(0) > ind3dnBand1 + sigma && Open(1) < ind3dnBand2 - sigma;
Signal signal = CreateExitSignal(3, ind3long, ind3short, 23, 21, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetEntrySignal_04()
{
double ind0val1 = iAO(NULL,0,1);
double ind0val2 = iAO(NULL,0,2);
bool ind0long = ind0val1 > 0.0000 + sigma && ind0val2 < 0.0000 - sigma;
bool ind0short = ind0val1 < -1*0.0000 - sigma && ind0val2 > -1*0.0000 + sigma;
double ind1val1 = iAO(NULL,0,1);
double ind1val2 = iAO(NULL,0,2);
double ind1val3 = iAO(NULL,0,3);
bool ind1long = ind1val1 > ind1val2 + sigma && ind1val2 < ind1val3 - sigma;
bool ind1short = ind1val1 < ind1val2 - sigma && ind1val2 > ind1val3 + sigma;
Signal signal = CreateEntrySignal(4, ind0long && ind1long, ind0short && ind1short, 14, 26, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_04()
{
double ind2val1 = iAC(NULL,0,1);
bool ind2long = ind2val1 < 0.0000 - sigma;
bool ind2short = ind2val1 > -1*0.0000 + sigma;
Signal signal = CreateExitSignal(4, ind2long, ind2short, 14, 26, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
if(Pair==USDJPY)
Signal GetEntrySignal_00()
{
double ind0val1 = iMA(NULL,0,18,0,MODE_SMA,PRICE_CLOSE,1);
double ind0val2 = iMA(NULL,0,25,0,MODE_SMA,PRICE_CLOSE,1);
bool ind0long = ind0val1 < ind0val2 - sigma;
bool ind0short = ind0val1 > ind0val2 + sigma;
double ind1val1 = iStochastic(NULL,0,16,4,3,MODE_SMA,STO_LOWHIGH,MODE_MAIN,1);
double ind1val2 = iStochastic(NULL,0,16,4,3,MODE_SMA,STO_LOWHIGH,MODE_MAIN,2);
bool ind1long = ind1val1 > 14 + sigma && ind1val2 < 14 - sigma;
bool ind1short = ind1val1 < 100 - 14 - sigma && ind1val2 > 100 - 14 + sigma;
double ind2val1 = iMA(NULL,0,19,0,MODE_SMA,PRICE_CLOSE,1);
double ind2val2 = iMA(NULL,0,49,0,MODE_SMA,PRICE_CLOSE,1);
double ind2val3 = iMA(NULL,0,19,0,MODE_SMA,PRICE_CLOSE,2);
double ind2val4 = iMA(NULL,0,49,0,MODE_SMA,PRICE_CLOSE,2);
bool ind2long = ind2val1 < ind2val2 - sigma && ind2val3 > ind2val4 + sigma;
bool ind2short = ind2val1 > ind2val2 + sigma && ind2val3 < ind2val4 - sigma;
Signal signal = CreateEntrySignal(0, ind0long && ind1long && ind2long, ind0short && ind1short && ind2short, 12, 29, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_00()
{
double ind3val1 = iMA(NULL,0,25,0,MODE_SMA,PRICE_CLOSE,1);
bool ind3long = Open(0) > ind3val1 + sigma;
bool ind3short = Open(0) < ind3val1 - sigma;
Signal signal = CreateExitSignal(0, ind3long, ind3short, 12, 29, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetEntrySignal_01()
{
double ind0val1 = iADX(NULL,0,30,PRICE_CLOSE,0,1);
double ind0val2 = iADX(NULL,0,30,PRICE_CLOSE,0,2);
double ind0val3 = iADX(NULL,0,30,PRICE_CLOSE,0,3);
bool ind0long = ind0val1 > ind0val2 + sigma && ind0val2 < ind0val3 - sigma;
bool ind0short = ind0long;
double ind1val1 = iStdDev(NULL,0,41,0,MODE_SMA,PRICE_CLOSE,1);
double ind1val2 = iStdDev(NULL,0,41,0,MODE_SMA,PRICE_CLOSE,2);
double ind1val3 = iStdDev(NULL,0,41,0,MODE_SMA,PRICE_CLOSE,3);
bool ind1long = ind1val1 < ind1val2 - sigma && ind1val2 > ind1val3 + sigma;
bool ind1short = ind1long;
double ind2val1 = iADX(NULL,0,5,PRICE_CLOSE,1,1) - iADX(NULL,0,5,PRICE_CLOSE,2,1);
double ind2val2 = iADX(NULL,0,5,PRICE_CLOSE,1,2) - iADX(NULL,0,5,PRICE_CLOSE,2,2);
bool ind2long = ind2val1 < 0 - sigma && ind2val2 > 0 + sigma;
bool ind2short = ind2val1 > 0 + sigma && ind2val2 < 0 - sigma;
double ind3val1 = iStochastic(NULL,0,14,6,12,MODE_SMA,STO_LOWHIGH,MODE_MAIN,1);
double ind3val2 = iStochastic(NULL,0,14,6,12,MODE_SMA,STO_LOWHIGH,MODE_MAIN,2);
bool ind3long = ind3val1 > ind3val2 + sigma;
bool ind3short = ind3val1 < ind3val2 - sigma;
Signal signal = CreateEntrySignal(1, ind0long && ind1long && ind2long && ind3long, ind0short && ind1short && ind2short && ind3short, 24, 13, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_01()
{
double ind4val1 = iDeMarker(NULL,0,13,1);
double ind4val2 = iDeMarker(NULL,0,13,2);
bool ind4long = ind4val1 < 0.71 - sigma && ind4val2 > 0.71 + sigma;
bool ind4short = ind4val1 > 1 - 0.71 + sigma && ind4val2 < 1 - 0.71 - sigma;
Signal signal = CreateExitSignal(1, ind4long, ind4short, 24, 13, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetEntrySignal_02()
{
double ind0upBand1 = iEnvelopes(NULL,0,20,MODE_SMA,0,PRICE_CLOSE,0.43,MODE_UPPER,1);
double ind0dnBand1 = iEnvelopes(NULL,0,20,MODE_SMA,0,PRICE_CLOSE,0.43,MODE_LOWER,1);
double ind0upBand2 = iEnvelopes(NULL,0,20,MODE_SMA,0,PRICE_CLOSE,0.43,MODE_UPPER,2);
double ind0dnBand2 = iEnvelopes(NULL,0,20,MODE_SMA,0,PRICE_CLOSE,0.43,MODE_LOWER,2);
bool ind0long = Open(0) < ind0upBand1 - sigma && Open(1) > ind0upBand2 + sigma;
bool ind0short = Open(0) > ind0dnBand1 + sigma && Open(1) < ind0dnBand2 - sigma;
double ind1val1 = (double) iVolume(NULL,0,1);
double ind1val2 = (double) iVolume(NULL,0,2);
double ind1val3 = (double) iVolume(NULL,0,3);
bool ind1long = ind1val1 < ind1val2 - sigma && ind1val2 > ind1val3 + sigma;
bool ind1short = ind1long;
Signal signal = CreateEntrySignal(2, ind0long && ind1long, ind0short && ind1short, 19, 11, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_02()
{
double ind2val1 = iRVI(NULL,0,36,MODE_MAIN,1) - iRVI(NULL,0,36,MODE_SIGNAL,1);
double ind2val2 = iRVI(NULL,0,36,MODE_MAIN,2) - iRVI(NULL,0,36,MODE_SIGNAL,2);
bool ind2long = ind2val1 < 0 - sigma && ind2val2 > 0 + sigma;
bool ind2short = ind2val1 > 0 + sigma && ind2val2 < 0 - sigma;
double ind3val1 = iRVI(NULL,0,48,MODE_MAIN,1);
double ind3val2 = iRVI(NULL,0,48,MODE_MAIN,2);
double ind3val3 = iRVI(NULL,0,48,MODE_MAIN,3);
bool ind3long = ind3val1 > ind3val2 + sigma && ind3val2 < ind3val3 - sigma;
bool ind3short = ind3val1 < ind3val2 - sigma && ind3val2 > ind3val3 + sigma;
double ind4val1 = (double) iVolume(NULL,0,1);
double ind4val2 = (double) iVolume(NULL,0,2);
double ind4val3 = (double) iVolume(NULL,0,3);
bool ind4long = ind4val1 < ind4val2 - sigma && ind4val2 > ind4val3 + sigma;
bool ind4short = ind4long;
double ind5val1 = iMFI(NULL,0,29,1);
double ind5val2 = iMFI(NULL,0,29,2);
double ind5val3 = iMFI(NULL,0,29,3);
bool ind5long = ind5val1 > ind5val2 + sigma && ind5val2 < ind5val3 - sigma;
bool ind5short = ind5val1 < ind5val2 - sigma && ind5val2 > ind5val3 + sigma;
Signal signal = CreateExitSignal(2, true, true, 19, 11, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetEntrySignal_03()
{
double ind0upBand1 = iBands(NULL,0,18,1.33,0,PRICE_CLOSE,MODE_UPPER,1);
double ind0dnBand1 = iBands(NULL,0,18,1.33,0,PRICE_CLOSE,MODE_LOWER,1);
double ind0upBand2 = iBands(NULL,0,18,1.33,0,PRICE_CLOSE,MODE_UPPER,2);
double ind0dnBand2 = iBands(NULL,0,18,1.33,0,PRICE_CLOSE,MODE_LOWER,2);
bool ind0long = Open(0) > ind0upBand1 + sigma && Open(1) < ind0upBand2 - sigma;
bool ind0short = Open(0) < ind0dnBand1 - sigma && Open(1) > ind0dnBand2 + sigma;
double ind1val1 = iRVI(NULL,0,7,MODE_MAIN,1);
double ind1val2 = iRVI(NULL,0,7,MODE_MAIN,2);
bool ind1long = ind1val1 > 0.00 + sigma && ind1val2 < 0.00 - sigma;
bool ind1short = ind1val1 < -1*0.00 - sigma && ind1val2 > -1*0.00 + sigma;
double ind2val1 = iMA(NULL,0,38,0,MODE_SMA,PRICE_CLOSE,1);
double ind2val2 = iMA(NULL,0,38,0,MODE_SMA,PRICE_CLOSE,2);
double ind2val3 = iMA(NULL,0,38,0,MODE_SMA,PRICE_CLOSE,3);
bool ind2long = ind2val1 > ind2val2 + sigma && ind2val2 < ind2val3 - sigma;
bool ind2short = ind2val1 < ind2val2 - sigma && ind2val2 > ind2val3 + sigma;
Signal signal = CreateEntrySignal(3, ind0long && ind1long && ind2long, ind0short && ind1short && ind2short, 11, 42, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_03()
{
double ind3upBand1 = iEnvelopes(NULL,0,24,MODE_SMA,0,PRICE_CLOSE,0.10,MODE_UPPER,1);
double ind3dnBand1 = iEnvelopes(NULL,0,24,MODE_SMA,0,PRICE_CLOSE,0.10,MODE_LOWER,1);
double ind3upBand2 = iEnvelopes(NULL,0,24,MODE_SMA,0,PRICE_CLOSE,0.10,MODE_UPPER,2);
double ind3dnBand2 = iEnvelopes(NULL,0,24,MODE_SMA,0,PRICE_CLOSE,0.10,MODE_LOWER,2);
bool ind3long = Open(0) < ind3dnBand1 - sigma && Open(1) > ind3dnBand2 + sigma;
bool ind3short = Open(0) > ind3upBand1 + sigma && Open(1) < ind3upBand2 - sigma;
double ind4val1 = iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,1);
double ind4val2 = iMA(NULL,0,31,0,MODE_SMA,PRICE_CLOSE,1);
bool ind4long = ind4val1 < ind4val2 - sigma;
bool ind4short = ind4val1 > ind4val2 + sigma;
double ind5val1 = iRVI(NULL,0,6,MODE_MAIN,1);
double ind5val2 = iRVI(NULL,0,6,MODE_MAIN,2);
bool ind5long = ind5val1 > 0.00 + sigma && ind5val2 < 0.00 - sigma;
bool ind5short = ind5val1 < -1*0.00 - sigma && ind5val2 > -1*0.00 + sigma;
double ind6val1 = iADX(NULL,0,5,PRICE_CLOSE,1,1) - iADX(NULL,0,5,PRICE_CLOSE,2,1);
bool ind6long = ind6val1 > 0 + sigma;
bool ind6short = ind6val1 < 0 - sigma;
Signal signal = CreateExitSignal(3, true, true, 11, 42, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetEntrySignal_04()
{
double ind0val1 = iMFI(NULL,0,22,1);
double ind0val2 = iMFI(NULL,0,22,2);
bool ind0long = ind0val1 < 18 - sigma && ind0val2 > 18 + sigma;
bool ind0short = ind0val1 > 100 - 18 + sigma && ind0val2 < 100 - 18 - sigma;
double ind1val1 = iDeMarker(NULL,0,27,1);
double ind1val2 = iDeMarker(NULL,0,27,2);
bool ind1long = ind1val1 < 0.33 - sigma && ind1val2 > 0.33 + sigma;
bool ind1short = ind1val1 > 1 - 0.33 + sigma && ind1val2 < 1 - 0.33 - sigma;
Signal signal = CreateEntrySignal(4, ind0long && ind1long, ind0short && ind1short, 16, 18, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
Signal GetExitSignal_04()
{
double ind2val1 = iATR(NULL,0,14,1);
double ind2val2 = iATR(NULL,0,14,2);
bool ind2long = ind2val1 < ind2val2 - sigma;
bool ind2short = ind2long;
double ind3val1 = iMA(NULL,0,6,0,MODE_SMA,PRICE_CLOSE,1);
double ind3val2 = iMA(NULL,0,6,0,MODE_SMA,PRICE_CLOSE,2);
double ind3val3 = iMA(NULL,0,6,0,MODE_SMA,PRICE_CLOSE,3);
bool ind3long = ind3val1 > ind3val2 + sigma && ind3val2 < ind3val3 - sigma;
bool ind3short = ind3val1 < ind3val2 - sigma && ind3val2 > ind3val3 + sigma;
double ind4val1 = iAC(NULL,0,1);
double ind4val2 = iAC(NULL,0,2);
bool ind4long = ind4val1 < ind4val2 - sigma;
bool ind4short = ind4val1 > ind4val2 + sigma;
Signal signal = CreateExitSignal(4, true, true, 16, 18, false);
return (signal);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
but not working. i need an option to have between different "Signal GetEntrySignal" and "Signal GetExitSignal" ..
so easy copy from another portfolio into another one..but without changing the GetEntrySignal_XX number.
Or did i have put an if statement before portfolio start and use the other Signal List?