vwap ignore mix candles

This commit is contained in:
Sewmina 2025-03-21 16:17:30 +05:30
parent 6acd3e7c9a
commit 6607ee40f3

View File

@ -247,6 +247,7 @@ public static class Patterns{
bool isBelowVwap = curReport.Open < curReport.VwapWeekly || curReport.Close < curReport.VwapWeekly; bool isBelowVwap = curReport.Open < curReport.VwapWeekly || curReport.Close < curReport.VwapWeekly;
bool isSolid = IsSolid(curReport.candle) ; bool isSolid = IsSolid(curReport.candle) ;
bool isRed = curReport.RSI50 <= 50; bool isRed = curReport.RSI50 <= 50;
bool isRedCandle = curReport.candle.Open > curReport.Close;
bool beenAcrossVwap = (highCount / lowCount) > 0; bool beenAcrossVwap = (highCount / lowCount) > 0;
bool mostlyGreen = greenCandlesAmount > length /3f; bool mostlyGreen = greenCandlesAmount > length /3f;
bool isCrossingVwap = curReport.candle.High > curReport.VwapWeekly && curReport.candle.Low < curReport.VwapWeekly; bool isCrossingVwap = curReport.candle.High > curReport.VwapWeekly && curReport.candle.Low < curReport.VwapWeekly;
@ -257,7 +258,7 @@ public static class Patterns{
bool crossedRecently = candlesSinceLastHigh < (length/3); bool crossedRecently = candlesSinceLastHigh < (length/3);
bool isLarge = curReport.candle.getCandleLength() > avgSize; bool isLarge = curReport.candle.getCandleLength() > avgSize;
bool final = isRed && isSolid && isBelowVwap && beenAcrossVwap && mostlyGreen && !isCrossingVwap; bool final = isRed && isRedCandle && isSolid && isBelowVwap && beenAcrossVwap && mostlyGreen && !isCrossingVwap;
if(final){ if(final){
// Console.WriteLine($"Vwap(S) signal on {curReport.pair}({curReport.interval}m) : {highCount} / {lowCount} = {highCount/lowCount} , {candlesSinceLastHigh} last High"); // Console.WriteLine($"Vwap(S) signal on {curReport.pair}({curReport.interval}m) : {highCount} / {lowCount} = {highCount/lowCount} , {candlesSinceLastHigh} last High");
@ -307,6 +308,7 @@ public static class Patterns{
bool isAboveVwap = curReport.Open > curReport.VwapWeekly || curReport.Close > curReport.VwapWeekly; bool isAboveVwap = curReport.Open > curReport.VwapWeekly || curReport.Close > curReport.VwapWeekly;
bool isSolid = IsSolid(curReport.candle) ; bool isSolid = IsSolid(curReport.candle) ;
bool isGreen = curReport.RSI50 >= 50; bool isGreen = curReport.RSI50 >= 50;
bool isGreenCandle = curReport.candle.Open < curReport.candle.Close;
bool beenAcrossVwap = (highCount / lowCount) > 0; bool beenAcrossVwap = (highCount / lowCount) > 0;
bool mostylRed = greenCandlesAmount < length /3f; bool mostylRed = greenCandlesAmount < length /3f;
@ -317,7 +319,7 @@ public static class Patterns{
bool isLarge = curReport.candle.getCandleLength() > avgSize; bool isLarge = curReport.candle.getCandleLength() > avgSize;
bool isCrossingVwap = curReport.candle.High > curReport.VwapWeekly && curReport.candle.Low < curReport.VwapWeekly; bool isCrossingVwap = curReport.candle.High > curReport.VwapWeekly && curReport.candle.Low < curReport.VwapWeekly;
bool final = isGreen && isSolid && isAboveVwap && beenAcrossVwap && mostylRed && !isCrossingVwap; bool final = isGreen && isGreenCandle && isSolid && isAboveVwap && beenAcrossVwap && mostylRed && !isCrossingVwap;
if(final){ if(final){
// Console.WriteLine($"Vwap(L) signal on {curReport.pair}({curReport.interval}m) : {highCount} / {lowCount} = {highCount/lowCount} , {candlesSinceLastHigh} last High"); // Console.WriteLine($"Vwap(L) signal on {curReport.pair}({curReport.interval}m) : {highCount} / {lowCount} = {highCount/lowCount} , {candlesSinceLastHigh} last High");