From 6607ee40f3569aca34bd6a1fe105b3f4b600b840 Mon Sep 17 00:00:00 2001 From: Sewmina Date: Fri, 21 Mar 2025 16:17:30 +0530 Subject: [PATCH] vwap ignore mix candles --- Patterns.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Patterns.cs b/Patterns.cs index bafaffb..9cc58d9 100644 --- a/Patterns.cs +++ b/Patterns.cs @@ -247,6 +247,7 @@ public static class Patterns{ bool isBelowVwap = curReport.Open < curReport.VwapWeekly || curReport.Close < curReport.VwapWeekly; bool isSolid = IsSolid(curReport.candle) ; bool isRed = curReport.RSI50 <= 50; + bool isRedCandle = curReport.candle.Open > curReport.Close; bool beenAcrossVwap = (highCount / lowCount) > 0; bool mostlyGreen = greenCandlesAmount > length /3f; 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 isLarge = curReport.candle.getCandleLength() > avgSize; - bool final = isRed && isSolid && isBelowVwap && beenAcrossVwap && mostlyGreen && !isCrossingVwap; + bool final = isRed && isRedCandle && isSolid && isBelowVwap && beenAcrossVwap && mostlyGreen && !isCrossingVwap; if(final){ // 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 isSolid = IsSolid(curReport.candle) ; bool isGreen = curReport.RSI50 >= 50; + bool isGreenCandle = curReport.candle.Open < curReport.candle.Close; bool beenAcrossVwap = (highCount / lowCount) > 0; bool mostylRed = greenCandlesAmount < length /3f; @@ -317,7 +319,7 @@ public static class Patterns{ bool isLarge = curReport.candle.getCandleLength() > avgSize; 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){ // Console.WriteLine($"Vwap(L) signal on {curReport.pair}({curReport.interval}m) : {highCount} / {lowCount} = {highCount/lowCount} , {candlesSinceLastHigh} last High");