last ...
This commit is contained in:
@@ -1170,6 +1170,376 @@ struct X121Conditions
|
||||
//
|
||||
bullishScore = 0;
|
||||
bearishScore = 0;
|
||||
|
||||
//
|
||||
double minScore = 0.5;
|
||||
double score = 1;
|
||||
double highScore = 1.5;
|
||||
|
||||
//
|
||||
// SLOPES ...
|
||||
|
||||
//
|
||||
if (isRsiSlopeBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isStrSlopeBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isAtrUpperSlopeBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isAtrLowerSlopeBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isVwapFastSlopeBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isVwapMidSlopeBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isVwapSlowSlopeBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isRsiSlopeBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isStrSlopeBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isAtrUpperSlopeBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isAtrLowerSlopeBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isVwapFastSlopeBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isVwapMidSlopeBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isVwapSlowSlopeBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
|
||||
//
|
||||
// COMPLEX ...
|
||||
|
||||
//
|
||||
if (isRsiOverSold)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isRsiCrossedUnderOverSold)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isRsiOverBought)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isRsiCrossedOverOverBought)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
|
||||
//
|
||||
// TODO: ...
|
||||
// there many other complex conditions which may used lter ...
|
||||
//
|
||||
|
||||
//
|
||||
// XTREND ...
|
||||
|
||||
//
|
||||
if (isTrendBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isTrendSwitchedToBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (isTrendBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isTrendSwitchedToBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
// XSAR ...
|
||||
|
||||
//
|
||||
if (isSarBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isSarSwitchedToBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (isSarBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isSarSwitchedToBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
// XSTR ...
|
||||
|
||||
//
|
||||
if (isStrBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isStrSwitchedToBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
if (isStrBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isStrSwitchedToBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
|
||||
//
|
||||
// XCHE ...
|
||||
|
||||
//
|
||||
if (isCheBullish)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isCheSwitchedToBullish)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (isChe1Bullish &&
|
||||
!isCheBullish &&
|
||||
!isCheSwitchedToBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isChe1SwitchedToBullish &&
|
||||
!isCheBullish &&
|
||||
!isCheSwitchedToBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isCheBearish)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isCheSwitchedToBearish)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (isChe1Bearish &&
|
||||
!isCheBearish &&
|
||||
!isCheSwitchedToBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isChe1SwitchedToBearish &&
|
||||
!isCheBearish &&
|
||||
!isCheSwitchedToBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
|
||||
//
|
||||
// XVWAP ...
|
||||
|
||||
//
|
||||
if (isVWapBullishState)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isVWapBullishOrdered)
|
||||
{
|
||||
bullishScore += score;
|
||||
}
|
||||
if (isVWapSwitchedToBullishState)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (isVWapSwitchedToBullishOrdered)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (!isVWapBullishState &&
|
||||
!isVWapSwitchedToBullishState)
|
||||
{
|
||||
//
|
||||
if (isVWapFastBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isVWapSlowBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
}
|
||||
if (!isVWapBullishOrdered &&
|
||||
!isVWapSwitchedToBullishOrdered)
|
||||
{
|
||||
//
|
||||
if (isVWapFastOverMid)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isVWapMidOverSlow)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (isVWapBearishState)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isVWapBearishOrdered)
|
||||
{
|
||||
bearishScore += score;
|
||||
}
|
||||
if (isVWapSwitchedToBearishState)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (isVWapSwitchedToBearishOrdered)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (!isVWapBearishState &&
|
||||
!isVWapSwitchedToBearishState)
|
||||
{
|
||||
//
|
||||
if (isVWapFastBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isVWapSlowBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
}
|
||||
if (!isVWapBearishOrdered &&
|
||||
!isVWapSwitchedToBearishOrdered)
|
||||
{
|
||||
//
|
||||
if (isVWapFastUnderMid)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isVWapMidUnderSlow)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// XSMHK ...
|
||||
|
||||
//
|
||||
if (isSMHKBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isRawHKBullish)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isClosedOverSMHK)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isClosedOverRawHK)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isRawHKClosedOverSMHK)
|
||||
{
|
||||
bullishScore += minScore;
|
||||
}
|
||||
if (isSMHKSwitchedToBullish)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
if (isRawHKSwitchedToBullish)
|
||||
{
|
||||
bullishScore += highScore;
|
||||
}
|
||||
|
||||
//
|
||||
if (isSMHKBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isRawHKBearish)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isClosedUnderSMHK)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isClosedUnderRawHK)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isRawHKClosedUnderSMHK)
|
||||
{
|
||||
bearishScore += minScore;
|
||||
}
|
||||
if (isSMHKSwitchedToBearish)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
if (isRawHKSwitchedToBullish)
|
||||
{
|
||||
bearishScore += highScore;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user