last ...
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -488,7 +488,9 @@ public:
|
||||
//
|
||||
// XSTR ...
|
||||
bool isTrendBullish;
|
||||
bool isTrendSwitchedToBullish;
|
||||
bool isTrendBearish;
|
||||
bool isTrendSwitchedToBearish;
|
||||
|
||||
//
|
||||
// XCHE ...
|
||||
@@ -835,6 +837,7 @@ public:
|
||||
|
||||
//
|
||||
// Buffers ...
|
||||
Clean(bars);
|
||||
Clean(ichTenkanSens);
|
||||
Clean(ichKijunSens);
|
||||
Clean(ichChikouSpans);
|
||||
@@ -865,10 +868,45 @@ public:
|
||||
Clean(oscStochSignals);
|
||||
Clean(oscStddevs);
|
||||
|
||||
//
|
||||
// Buffers ...
|
||||
ArraySetAsSeries(bars, true);
|
||||
ArraySetAsSeries(ichTenkanSens, true);
|
||||
ArraySetAsSeries(ichKijunSens, true);
|
||||
ArraySetAsSeries(ichChikouSpans, true);
|
||||
ArraySetAsSeries(ichSenkouSpanAs, true);
|
||||
ArraySetAsSeries(ichSenkouSpanBs, true);
|
||||
ArraySetAsSeries(mcFasts, true);
|
||||
ArraySetAsSeries(mcSlows, true);
|
||||
ArraySetAsSeries(mcVerifiers, true);
|
||||
ArraySetAsSeries(strTrends, true);
|
||||
ArraySetAsSeries(strStates, true);
|
||||
ArraySetAsSeries(cheLongExit1s, true);
|
||||
ArraySetAsSeries(cheLongExit2s, true);
|
||||
ArraySetAsSeries(cheShortExit1s, true);
|
||||
ArraySetAsSeries(cheShortExit2s, true);
|
||||
ArraySetAsSeries(oscAtrs, true);
|
||||
ArraySetAsSeries(oscRviMains, true);
|
||||
ArraySetAsSeries(oscRviSignals, true);
|
||||
ArraySetAsSeries(oscBullPs, true);
|
||||
ArraySetAsSeries(oscBearPs, true);
|
||||
ArraySetAsSeries(oscVolumes, true);
|
||||
ArraySetAsSeries(oscRsis, true);
|
||||
ArraySetAsSeries(oscCcis, true);
|
||||
ArraySetAsSeries(oscMomentums, true);
|
||||
ArraySetAsSeries(oscSars, true);
|
||||
ArraySetAsSeries(oscMacdMains, true);
|
||||
ArraySetAsSeries(oscMacdSignals, true);
|
||||
ArraySetAsSeries(oscStochMains, true);
|
||||
ArraySetAsSeries(oscStochSignals, true);
|
||||
ArraySetAsSeries(oscStddevs, true);
|
||||
|
||||
//
|
||||
// XTSR ...
|
||||
isTrendBullish = false;
|
||||
isTrendBearish = false;
|
||||
isTrendSwitchedToBullish = false;
|
||||
isTrendSwitchedToBearish = false;
|
||||
|
||||
//
|
||||
// XCHE ...
|
||||
@@ -1046,6 +1084,18 @@ public:
|
||||
{
|
||||
bearScore++;
|
||||
}
|
||||
if (isTrendSwitchedToBullish)
|
||||
{
|
||||
//
|
||||
bullScore++;
|
||||
bearScore--:
|
||||
}
|
||||
if (isTrendSwitchedToBearish)
|
||||
{
|
||||
//
|
||||
bullScore--;
|
||||
bearScore++:
|
||||
}
|
||||
|
||||
//
|
||||
// XICH ...
|
||||
@@ -1505,6 +1555,8 @@ public:
|
||||
//
|
||||
ToString("isTrendBullish", isTrendBullish, ignoreFalseConditions) +
|
||||
ToString("isTrendBearish", isTrendBearish, ignoreFalseConditions) +
|
||||
ToString("isTrendSwitchedToBullish", isTrendSwitchedToBullish, ignoreFalseConditions) +
|
||||
ToString("isTrendSwitchedToBearish", isTrendSwitchedToBearish, ignoreFalseConditions) +
|
||||
""
|
||||
//
|
||||
;
|
||||
@@ -1887,6 +1939,10 @@ public:
|
||||
barIndex = CountBars() + 2;
|
||||
}
|
||||
|
||||
//
|
||||
int curr = barIndex + 1;
|
||||
int prev = curr + 1;
|
||||
|
||||
//
|
||||
// Here i Have to Calculate Market Conditions based on
|
||||
// Several Indicator/Oscillator(s) ...
|
||||
@@ -2016,18 +2072,42 @@ public:
|
||||
//
|
||||
bool isTrendBullish =
|
||||
//
|
||||
str.IsBullish(str.GetState(barIndex))
|
||||
str.IsBullish(str.GetState(curr))
|
||||
//
|
||||
;
|
||||
bool isTrendBearish =
|
||||
//
|
||||
str.IsBearish(str.GetState(barIndex))
|
||||
str.IsBearish(str.GetState(curr))
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isTrendBullishPrev =
|
||||
//
|
||||
str.IsBullish(str.GetState(prev))
|
||||
//
|
||||
;
|
||||
bool isTrendBearishPrev =
|
||||
//
|
||||
str.IsBearish(str.GetState(prev))
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
conditions.isTrendBullish = isTrendBullish;
|
||||
conditions.isTrendBearish = isTrendBearish;
|
||||
conditions.isTrendSwitchedToBullish =
|
||||
//
|
||||
isTrendBullish &&
|
||||
!isTrendBullishPrev
|
||||
//
|
||||
;
|
||||
conditions.isTrendSwitchedToBearish =
|
||||
//
|
||||
isTrendBearish &&
|
||||
!isTrendBearishPrev
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
// XCHE ...
|
||||
@@ -2057,24 +2137,24 @@ public:
|
||||
//
|
||||
bool isCHEInLong =
|
||||
//
|
||||
NotEmpty(che.GetLongExit1(barIndex))
|
||||
NotEmpty(che.GetLongExit1(curr))
|
||||
//
|
||||
;
|
||||
bool isCHEInStrongLong =
|
||||
//
|
||||
isCHEInLong &&
|
||||
NotEmpty(che.GetLongExit2(barIndex))
|
||||
NotEmpty(che.GetLongExit2(curr))
|
||||
//
|
||||
;
|
||||
bool isCHEInShort =
|
||||
//
|
||||
NotEmpty(che.GetShortExit1(barIndex))
|
||||
NotEmpty(che.GetShortExit1(curr))
|
||||
//
|
||||
;
|
||||
bool isCHEInStrongShort =
|
||||
//
|
||||
isCHEInShort &&
|
||||
NotEmpty(che.GetShortExit2(barIndex))
|
||||
NotEmpty(che.GetShortExit2(curr))
|
||||
//
|
||||
;
|
||||
|
||||
@@ -2107,68 +2187,68 @@ public:
|
||||
//
|
||||
bool isFastOverSlow =
|
||||
//
|
||||
conditions.mcFasts[0] > conditions.mcSlows[0] &&
|
||||
conditions.mcFasts[1] > conditions.mcSlows[1]
|
||||
conditions.mcFasts[curr] > conditions.mcSlows[curr] &&
|
||||
conditions.mcFasts[prev] > conditions.mcSlows[prev]
|
||||
//
|
||||
;
|
||||
bool isFastUnderSlow =
|
||||
//
|
||||
conditions.mcFasts[0] < conditions.mcSlows[0] &&
|
||||
conditions.mcFasts[1] < conditions.mcSlows[1]
|
||||
conditions.mcFasts[curr] < conditions.mcSlows[curr] &&
|
||||
conditions.mcFasts[prev] < conditions.mcSlows[prev]
|
||||
//
|
||||
;
|
||||
bool isFastOverVerifier =
|
||||
//
|
||||
conditions.mcFasts[0] > conditions.mcVerifiers[0] &&
|
||||
conditions.mcFasts[1] > conditions.mcVerifiers[1]
|
||||
conditions.mcFasts[curr] > conditions.mcVerifiers[curr] &&
|
||||
conditions.mcFasts[prev] > conditions.mcVerifiers[prev]
|
||||
//
|
||||
;
|
||||
bool isFastUnderVerifier =
|
||||
//
|
||||
conditions.mcFasts[0] < conditions.mcVerifiers[0] &&
|
||||
conditions.mcFasts[1] < conditions.mcVerifiers[1]
|
||||
conditions.mcFasts[curr] < conditions.mcVerifiers[curr] &&
|
||||
conditions.mcFasts[prev] < conditions.mcVerifiers[prev]
|
||||
//
|
||||
;
|
||||
bool isSlowOverVerifier =
|
||||
//
|
||||
conditions.mcSlows[0] > conditions.mcVerifiers[0] &&
|
||||
conditions.mcSlows[1] > conditions.mcVerifiers[1]
|
||||
conditions.mcSlows[curr] > conditions.mcVerifiers[curr] &&
|
||||
conditions.mcSlows[prev] > conditions.mcVerifiers[prev]
|
||||
//
|
||||
;
|
||||
bool isSlowUnderVerifier =
|
||||
//
|
||||
conditions.mcSlows[0] < conditions.mcVerifiers[0] &&
|
||||
conditions.mcSlows[1] < conditions.mcVerifiers[1]
|
||||
conditions.mcSlows[curr] < conditions.mcVerifiers[curr] &&
|
||||
conditions.mcSlows[prev] < conditions.mcVerifiers[prev]
|
||||
//
|
||||
;
|
||||
bool isCloseOverFast =
|
||||
//
|
||||
pBar.close > conditions.mcFasts[1]
|
||||
pBar.close > conditions.mcFasts[prev]
|
||||
//
|
||||
;
|
||||
bool isCloseUnderFast =
|
||||
//
|
||||
pBar.close < conditions.mcFasts[1]
|
||||
pBar.close < conditions.mcFasts[prev]
|
||||
//
|
||||
;
|
||||
bool isCloseOverSlow =
|
||||
//
|
||||
pBar.close > conditions.mcSlows[1]
|
||||
pBar.close > conditions.mcSlows[prev]
|
||||
//
|
||||
;
|
||||
bool isCloseUnderSlow =
|
||||
//
|
||||
pBar.close < conditions.mcSlows[1]
|
||||
pBar.close < conditions.mcSlows[prev]
|
||||
//
|
||||
;
|
||||
bool isCloseOverVerifier =
|
||||
//
|
||||
pBar.close > conditions.mcVerifiers[1]
|
||||
pBar.close > conditions.mcVerifiers[prev]
|
||||
//
|
||||
;
|
||||
bool isCloseUnderVerifier =
|
||||
//
|
||||
pBar.close < conditions.mcVerifiers[1]
|
||||
pBar.close < conditions.mcVerifiers[prev]
|
||||
//
|
||||
;
|
||||
|
||||
@@ -2217,28 +2297,28 @@ public:
|
||||
);
|
||||
|
||||
//
|
||||
double tenkanSen = ich.GetTenkanSen(barIndex);
|
||||
double tenkanSenPrev = ich.GetTenkanSen(barIndex + 1);
|
||||
double tenkanSen = ich.GetTenkanSen(curr);
|
||||
double tenkanSenPrev = ich.GetTenkanSen(prev);
|
||||
|
||||
//
|
||||
double kijunSen = ich.GetKijunSen(barIndex);
|
||||
double kijunSenPrev = ich.GetKijunSen(barIndex + 1);
|
||||
double kijunSen = ich.GetKijunSen(curr);
|
||||
double kijunSenPrev = ich.GetKijunSen(prev);
|
||||
|
||||
//
|
||||
double senkouSpanA = ich.GetSenkouSpanA(barIndex);
|
||||
double senkouSpanAPrev = ich.GetSenkouSpanA(barIndex + 1);
|
||||
double senkouSpanA = ich.GetSenkouSpanA(curr);
|
||||
double senkouSpanAPrev = ich.GetSenkouSpanA(prev);
|
||||
|
||||
//
|
||||
double senkouSpanB = ich.GetSenkouSpanB(barIndex);
|
||||
double senkouSpanBPrev = ich.GetSenkouSpanB(barIndex + 1);
|
||||
double senkouSpanB = ich.GetSenkouSpanB(curr);
|
||||
double senkouSpanBPrev = ich.GetSenkouSpanB(prev);
|
||||
|
||||
//
|
||||
double futureSenkouSpanA = ich.GetFutureSenkouSpanA(barIndex);
|
||||
double futureSenkouSpanAPrev = ich.GetFutureSenkouSpanA(barIndex + 1);
|
||||
double futureSenkouSpanA = ich.GetFutureSenkouSpanA(curr);
|
||||
double futureSenkouSpanAPrev = ich.GetFutureSenkouSpanA(prev);
|
||||
|
||||
//
|
||||
double futureSenkouSpanB = ich.GetFutureSenkouSpanB(barIndex);
|
||||
double futureSenkouSpanBPrev = ich.GetFutureSenkouSpanB(barIndex + 1);
|
||||
double futureSenkouSpanB = ich.GetFutureSenkouSpanB(curr);
|
||||
double futureSenkouSpanBPrev = ich.GetFutureSenkouSpanB(prev);
|
||||
|
||||
//
|
||||
bool isSenkouSpanAOverB = senkouSpanA > senkouSpanB;
|
||||
@@ -2335,8 +2415,8 @@ public:
|
||||
);
|
||||
|
||||
//
|
||||
double rvi = osc.GetRVI(barIndex);
|
||||
double rviSignal = osc.GetRVISignal(barIndex);
|
||||
double rvi = osc.GetRVI(curr);
|
||||
double rviSignal = osc.GetRVISignal(curr);
|
||||
|
||||
//
|
||||
bool isRVILongStart =
|
||||
@@ -2385,7 +2465,7 @@ public:
|
||||
);
|
||||
|
||||
//
|
||||
double rsi = osc.GetRSI(barIndex);
|
||||
double rsi = osc.GetRSI(curr);
|
||||
|
||||
//
|
||||
bool isRSIUnder50 =
|
||||
@@ -2426,8 +2506,8 @@ public:
|
||||
);
|
||||
|
||||
//
|
||||
double bullp = osc.GetBullPower(barIndex);
|
||||
double bullpLast = osc.GetBullPower(barIndex + 1);
|
||||
double bullp = osc.GetBullPower(curr);
|
||||
double bullpLast = osc.GetBullPower(prev);
|
||||
|
||||
//
|
||||
bool isBullPowerOverLast =
|
||||
@@ -2468,8 +2548,8 @@ public:
|
||||
);
|
||||
|
||||
//
|
||||
double bearp = osc.GetBearPower(barIndex);
|
||||
double bearpLast = osc.GetBearPower(barIndex + 1);
|
||||
double bearp = osc.GetBearPower(curr);
|
||||
double bearpLast = osc.GetBearPower(prev);
|
||||
|
||||
//
|
||||
bool isBearPowerOverLast =
|
||||
@@ -2510,7 +2590,7 @@ public:
|
||||
);
|
||||
|
||||
//
|
||||
double cci = osc.GetCCI(barIndex);
|
||||
double cci = osc.GetCCI(curr);
|
||||
|
||||
//
|
||||
bool isCCIPositive =
|
||||
@@ -2556,8 +2636,8 @@ public:
|
||||
);
|
||||
|
||||
//
|
||||
double macd = osc.GetMACD(barIndex);
|
||||
double macdSignal = osc.GetMACDSignal(barIndex);
|
||||
double macd = osc.GetMACD(curr);
|
||||
double macdSignal = osc.GetMACDSignal(curr);
|
||||
|
||||
//
|
||||
bool isMACDPositiove =
|
||||
@@ -2603,8 +2683,8 @@ public:
|
||||
);
|
||||
|
||||
//
|
||||
double stoch = osc.GetSTOCH(barIndex);
|
||||
double stochSignal = osc.GetSTOCHSignal(barIndex);
|
||||
double stoch = osc.GetSTOCH(curr);
|
||||
double stochSignal = osc.GetSTOCHSignal(curr);
|
||||
|
||||
//
|
||||
bool isStochKOverD =
|
||||
@@ -2670,8 +2750,8 @@ public:
|
||||
double stdDevAVG = GetAverage(stdDevs);
|
||||
|
||||
//
|
||||
double stdDev = osc.GetSTDDEV(barIndex);
|
||||
double stdDevLast = osc.GetSTDDEV(barIndex + 1);
|
||||
double stdDev = osc.GetSTDDEV(curr);
|
||||
double stdDevLast = osc.GetSTDDEV(prev);
|
||||
|
||||
//
|
||||
bool isSTDDEVOverAVG =
|
||||
|
||||
@@ -554,6 +554,7 @@ public:
|
||||
void Clear()
|
||||
{
|
||||
//
|
||||
Clean(bars);
|
||||
Clean(tsCurrents);
|
||||
Clean(tsNearests);
|
||||
Clean(tsMediests);
|
||||
@@ -585,6 +586,7 @@ public:
|
||||
Clean(chlhHotStates);
|
||||
|
||||
//
|
||||
ArraySetAsSeries(bars, true);
|
||||
ArraySetAsSeries(tsCurrents, true);
|
||||
ArraySetAsSeries(tsNearests, true);
|
||||
ArraySetAsSeries(tsMediests, true);
|
||||
@@ -2507,13 +2509,38 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
virtual void GetMarketConditions(
|
||||
void GetMarketConditions(
|
||||
X5MarketConditions &mConditions, // Market Conditions Result
|
||||
int barIndex = 0 // Specified Bar Index
|
||||
)
|
||||
{
|
||||
//
|
||||
mConditions.Clear();
|
||||
|
||||
//
|
||||
if (barIndex < 0)
|
||||
{
|
||||
barIndex = 0;
|
||||
}
|
||||
|
||||
//
|
||||
if (barIndex >= CountBars())
|
||||
{
|
||||
barIndex = CountBars() + 2;
|
||||
}
|
||||
|
||||
//
|
||||
int curr = barIndex + 1;
|
||||
int prev = curr + 1;
|
||||
|
||||
//
|
||||
GetBars(
|
||||
mConditions.bars,
|
||||
mConditions.symbol,
|
||||
mConditions.period,
|
||||
barIndex,
|
||||
mNumberOfItems //
|
||||
);
|
||||
|
||||
//
|
||||
// XTM ...
|
||||
|
||||
@@ -0,0 +1,286 @@
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
double bullishScore = 0;
|
||||
double bearishScore = 0;
|
||||
|
||||
//
|
||||
mConditions.GenerateScore(
|
||||
bullishScore,
|
||||
bearishScore //
|
||||
);
|
||||
|
||||
//
|
||||
bool scorePassed = bearishScore > 2 * bullishScore;
|
||||
|
||||
//
|
||||
// Candlestick ...
|
||||
bool cMCandlestickPassed =
|
||||
//
|
||||
mConditions.cMarketConditions.isLastBullish ||
|
||||
mConditions.cMarketConditions.isCurrentBullish ||
|
||||
mConditions.cMarketConditions.isCurrentMidLineOverLastMidLine
|
||||
//
|
||||
;
|
||||
bool sMCandlestickPassed =
|
||||
//
|
||||
mConditions.sMarketConditions.isLastBullish ||
|
||||
mConditions.sMarketConditions.isCurrentBullish ||
|
||||
mConditions.sMarketConditions.isCurrentMidLineOverLastMidLine
|
||||
//
|
||||
;
|
||||
bool mMCandlestickPassed =
|
||||
//
|
||||
mConditions.mMarketConditions.isLastBullish ||
|
||||
mConditions.mMarketConditions.isCurrentBullish ||
|
||||
mConditions.mMarketConditions.isCurrentMidLineOverLastMidLine
|
||||
//
|
||||
;
|
||||
bool lMCandlestickPassed =
|
||||
//
|
||||
mConditions.lMarketConditions.isLastBullish ||
|
||||
mConditions.lMarketConditions.isCurrentBullish ||
|
||||
mConditions.lMarketConditions.isCurrentMidLineOverLastMidLine
|
||||
//
|
||||
;
|
||||
bool hMCandlestickPassed =
|
||||
//
|
||||
mConditions.hMarketConditions.isLastBullish ||
|
||||
mConditions.hMarketConditions.isCurrentBullish ||
|
||||
mConditions.hMarketConditions.isCurrentMidLineOverLastMidLine
|
||||
//
|
||||
;
|
||||
bool marketsCandlesticPassed =
|
||||
//
|
||||
cMCandlestickPassed &&
|
||||
sMCandlestickPassed &&
|
||||
mMCandlestickPassed &&
|
||||
lMCandlestickPassed &&
|
||||
hMCandlestickPassed
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
|
||||
|
||||
// //
|
||||
// isSenkouSpanAOverB
|
||||
// isSenkouSpanAOverLast
|
||||
// isFutureSenkouSpanAOverB
|
||||
// isFutureSenkouSpanAOverLast
|
||||
|
||||
// //
|
||||
// isCloseOverKijunSen
|
||||
|
||||
// //
|
||||
// isTenkanSenOverKijunSen
|
||||
// isTenkanSenCrossedOverKijunSen
|
||||
|
||||
// //
|
||||
// isFastOverSlow
|
||||
// isFastOverVerifier
|
||||
// isSlowOverVerifier
|
||||
// isCloseOverFast
|
||||
// isCloseOverSlow
|
||||
// isCloseOverVerifier
|
||||
|
||||
// //
|
||||
// isTrendBullish
|
||||
|
||||
// //
|
||||
// isCHEInLong
|
||||
// isCHEInStrongLong
|
||||
|
||||
// //
|
||||
// isRVILongStart
|
||||
|
||||
// //
|
||||
// isBullPowerOverLast
|
||||
// isBullPowerOverZero
|
||||
|
||||
// //
|
||||
// isBearPoswerUnderLast
|
||||
// isBearPoswerUnderZero
|
||||
|
||||
// //
|
||||
// isCCIPositive
|
||||
// isCCIOverPositiveHundred
|
||||
|
||||
// //
|
||||
// isSTDDEVOverAVG
|
||||
// isSTDDEVOverLast
|
||||
|
||||
// //
|
||||
// isMACDPositiove
|
||||
// isMACDOverSignal
|
||||
|
||||
//
|
||||
// isDONAttachedMinLower
|
||||
// isDONCrossedOverMaxLower
|
||||
|
||||
//
|
||||
// isPVFiboIncreased
|
||||
// isPVNewPeakUnderLast
|
||||
|
||||
// //
|
||||
// isPVSCBullish
|
||||
// isPVMCBullish
|
||||
// isPVLCBullish
|
||||
// isPVHCBullish
|
||||
|
||||
// //
|
||||
// isPVSCLLBullish
|
||||
// isPVMCLLBullish
|
||||
// isPVLCLLBullish
|
||||
// isPVHCLLBullish
|
||||
|
||||
// //
|
||||
// isPVSCSwitchedToBullish
|
||||
// isPVMCSwitchedToBullish
|
||||
// isPVLCSwitchedToBullish
|
||||
// isPVHCSwitchedToBullish
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
scorePassed &&
|
||||
mConditions.lMarketConditions.isCurrentMidLineOverLastMidLine
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
|
||||
|
||||
//
|
||||
isPriceCrossedOverLastLowOfHMarket
|
||||
//
|
||||
// //
|
||||
// (bullishScore > bearishScore &&
|
||||
// MathAbs(bullishScore - bearishScore) > threshold)
|
||||
// //
|
||||
// &&
|
||||
// //
|
||||
// ((isPriceCrossedOverLastMidLineOfHMarket ||
|
||||
// isPriceCrossedOverCurrentMidLineOfHMarket) &&
|
||||
// mConditions.hMarketConditions.isCurrentMidLineOverLastMidLine)
|
||||
// //
|
||||
|
||||
|
||||
|
||||
//
|
||||
double entry = GetEntry(mConditions.symbol);
|
||||
XOHCL cHBar = hMarket.GetBar(0);
|
||||
XOHCL pHBar = hMarket.GetBar(1);
|
||||
double lastHBarMid = pHBar.GetMid();
|
||||
double currentHBarMid = cHBar.GetMid();
|
||||
bool isPriceCrossedOverLastMidLineOfHMarket =
|
||||
//
|
||||
(mConditions.bars[1].high < lastHBarMid ||
|
||||
mConditions.bars[1].open < lastHBarMid)
|
||||
//
|
||||
&&
|
||||
//
|
||||
(mConditions.bars[0].low > lastHBarMid ||
|
||||
mConditions.bars[0].close > lastHBarMid)
|
||||
//
|
||||
;
|
||||
bool isPriceCrossedOverCurrentMidLineOfHMarket =
|
||||
//
|
||||
(mConditions.bars[1].high < currentHBarMid ||
|
||||
mConditions.bars[1].open < currentHBarMid)
|
||||
//
|
||||
&&
|
||||
//
|
||||
(mConditions.bars[0].low > currentHBarMid ||
|
||||
mConditions.bars[0].close > currentHBarMid)
|
||||
//
|
||||
;
|
||||
bool isPriceCrossedOverLastLowOfHMarket =
|
||||
//
|
||||
mConditions.bars[2].close < pHBar.low &&
|
||||
mConditions.bars[1].close > pHBar.low
|
||||
//
|
||||
;
|
||||
|
||||
// //
|
||||
// isSenkouSpanAOverB
|
||||
// isSenkouSpanAOverLast
|
||||
// isFutureSenkouSpanAOverB
|
||||
// isFutureSenkouSpanAOverLast
|
||||
|
||||
// //
|
||||
// isCloseOverKijunSen
|
||||
|
||||
// //
|
||||
// isTenkanSenOverKijunSen
|
||||
// isTenkanSenCrossedOverKijunSen
|
||||
|
||||
// //
|
||||
// isFastOverSlow
|
||||
// isFastOverVerifier
|
||||
// isSlowOverVerifier
|
||||
// isCloseOverFast
|
||||
// isCloseOverSlow
|
||||
// isCloseOverVerifier
|
||||
|
||||
// //
|
||||
// isTrendBullish
|
||||
|
||||
// //
|
||||
// isCHEInLong
|
||||
// isCHEInStrongLong
|
||||
|
||||
// //
|
||||
// isRVILongStart
|
||||
|
||||
// //
|
||||
// isBullPowerOverLast
|
||||
// isBullPowerOverZero
|
||||
|
||||
// //
|
||||
// isBearPoswerUnderLast
|
||||
// isBearPoswerUnderZero
|
||||
|
||||
// //
|
||||
// isCCIPositive
|
||||
// isCCIOverPositiveHundred
|
||||
|
||||
// //
|
||||
// isSTDDEVOverAVG
|
||||
// isSTDDEVOverLast
|
||||
|
||||
// //
|
||||
// isMACDPositiove
|
||||
// isMACDOverSignal
|
||||
|
||||
//
|
||||
// isDONAttachedMinLower
|
||||
// isDONCrossedOverMaxLower
|
||||
|
||||
//
|
||||
// isPVFiboIncreased
|
||||
// isPVNewPeakUnderLast
|
||||
|
||||
// //
|
||||
// isPVSCBullish
|
||||
// isPVMCBullish
|
||||
// isPVLCBullish
|
||||
// isPVHCBullish
|
||||
|
||||
// //
|
||||
// isPVSCLLBullish
|
||||
// isPVMCLLBullish
|
||||
// isPVLCLLBullish
|
||||
// isPVHCLLBullish
|
||||
|
||||
// //
|
||||
// isPVSCSwitchedToBullish
|
||||
// isPVMCSwitchedToBullish
|
||||
// isPVLCSwitchedToBullish
|
||||
// isPVHCSwitchedToBullish
|
||||
@@ -30,14 +30,14 @@
|
||||
|
||||
//
|
||||
// Inputs ...
|
||||
long x121EAMagicNumber = 78692110; // Magic Number
|
||||
int x121EASlippage = 10; // Slippgae
|
||||
string x121EASymbols = "EURUSDb,USDCHFb"; // Symbols
|
||||
long x121EAMagicNumber = 78692110; // Magic Number
|
||||
int x121EASlippage = 10; // Slippgae
|
||||
string x121EASymbols = "EURUSDb"; // Symbols
|
||||
//
|
||||
bool x121EAAllowLong = true; // Allow Long Trades
|
||||
bool x121EAAllowShort = true; // Allow Short Trades
|
||||
int x121EAManageInterval = 5; // Manager Check Intervals Seconds
|
||||
int x121EAMaxAllowedPositions = 15; // Max Allowed Positions
|
||||
int x121EAMaxAllowedPositions = 0; // Max Allowed Positions
|
||||
double x121EAMaxAllowedSpread = 0; // Max Allowed Spred for Opening Trades
|
||||
double x121EAMinProfitPerTrade = 0; // Min Profit Per Trade based On Volume Factor (Hedge)
|
||||
double x121EAMinProfitPerVolumeFactor = 0; // Min Volume Factor for Calculating Profit (Hedge)
|
||||
@@ -260,9 +260,32 @@ bool InitialEA()
|
||||
iDescriptor.inputs.cheInputs.showLongExit2Line = false;
|
||||
iDescriptor.inputs.cheInputs.showShortExit2Line = false;
|
||||
|
||||
//
|
||||
// XPV ...
|
||||
iDescriptor.inputs.pvInputs.showPeaksAndVales = true;
|
||||
iDescriptor.inputs.pvInputs.showLevels = false;
|
||||
iDescriptor.inputs.pvInputs.showConsolidations = false;
|
||||
iDescriptor.inputs.pvInputs.showFibo1Levels = false;
|
||||
iDescriptor.inputs.pvInputs.showFibo2Levels = false;
|
||||
iDescriptor.inputs.pvInputs.showFibo3Levels = true;
|
||||
iDescriptor.inputs.pvInputs.showFibo4Levels = false;
|
||||
iDescriptor.inputs.pvInputs.showFibo5Levels = false;
|
||||
|
||||
//
|
||||
// XZG ...
|
||||
iDescriptor.inputs.zgInputs.showZigZag = false;
|
||||
iDescriptor.inputs.zgInputs.showPeaksAndVales = false;
|
||||
|
||||
//
|
||||
// XDON ...
|
||||
iDescriptor.inputs.donInputs.showOpen = true;
|
||||
iDescriptor.inputs.donInputs.showHigh = true;
|
||||
iDescriptor.inputs.donInputs.showClose = true;
|
||||
iDescriptor.inputs.donInputs.showLow = true;
|
||||
|
||||
//
|
||||
// XSTR ...
|
||||
iDescriptor.inputs.strInputs.showTrends = false;
|
||||
iDescriptor.inputs.strInputs.showTrends = true;
|
||||
iDescriptor.inputs.strInputs.fillTrends = false;
|
||||
|
||||
//
|
||||
@@ -294,7 +317,7 @@ bool InitialEA()
|
||||
// Hind Market ...
|
||||
iDescriptor.inputs.hMarketPeriod = NULL;
|
||||
iDescriptor.inputs.hMarketMethod = X_PERIOD_AUTO;
|
||||
iDescriptor.inputs.hMarketInputs.drawLabels = true;
|
||||
iDescriptor.inputs.hMarketInputs.drawLabels = false;
|
||||
iDescriptor.inputs.hMarketInputs.drawCBar = true;
|
||||
iDescriptor.inputs.hMarketInputs.drawPBar = true;
|
||||
iDescriptor.inputs.hMarketInputs.drawCBarMid = true;
|
||||
|
||||
@@ -301,7 +301,7 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
double GetPeaksAndValues(
|
||||
double GetPeaksAndVales(
|
||||
int barIndex // Bar Index
|
||||
)
|
||||
{
|
||||
@@ -327,7 +327,7 @@ public:
|
||||
|
||||
//
|
||||
// Copy Required Items ...
|
||||
int CopyPeaksAndValues(
|
||||
int CopyPeaksAndVales(
|
||||
int start, // Start
|
||||
int count, // Number of Items for read
|
||||
double &buffer[], // Dest Buffer
|
||||
|
||||
Reference in New Issue
Block a user