vwap long signal
This commit is contained in:
parent
05024836b6
commit
3d5fc5586e
10
CoinWatch.cs
10
CoinWatch.cs
|
|
@ -154,7 +154,8 @@ namespace SignalsTest
|
|||
reports[i].isBullFlag = Confirmations.IsBullFlag(reports, i);
|
||||
reports[i].RelativeVolumeIndex = Confirmations.GetRelativeVolumeIndex(reports,i);
|
||||
|
||||
reports[i].isVwapSignal = Patterns.isVwapThing1(reports, i);
|
||||
reports[i].isVwapShort = Patterns.isVwapShort(reports, i);
|
||||
reports[i].isVwapLong = Patterns.isVwapLong(reports,i);
|
||||
}
|
||||
|
||||
Console.WriteLine($"Drawing chart for {reports.Count} candles, Coin: {symbol}, ceil:{max}, floor:{min}");
|
||||
|
|
@ -205,8 +206,11 @@ namespace SignalsTest
|
|||
// triggers+=$"Possible Bull Flag\n";
|
||||
// }
|
||||
|
||||
if(reports[reports.Count-1].isVwapSignal){
|
||||
triggers+=$"VWAP Signal\n";
|
||||
if(reports[reports.Count-1].isVwapShort){
|
||||
triggers+=$"VWAP Short Signal\n";
|
||||
}
|
||||
if(reports[reports.Count-1].isVwapLong){
|
||||
triggers+=$"VWAP Long Signal\n";
|
||||
}
|
||||
if (triggers != "")
|
||||
{
|
||||
|
|
|
|||
63
Patterns.cs
63
Patterns.cs
|
|
@ -204,7 +204,7 @@ public static class Patterns{
|
|||
}
|
||||
|
||||
|
||||
public static bool isVwapThing1(List<TAReport> responses, int index, int length = 10){
|
||||
public static bool isVwapShort(List<TAReport> responses, int index, int length = 10){
|
||||
if(index < length * 2){
|
||||
return false;
|
||||
}
|
||||
|
|
@ -259,7 +259,66 @@ public static class Patterns{
|
|||
bool final = isRed && isSolid && isBelowVwap && beenAcrossVwap && mostlyGreen;
|
||||
|
||||
if(final){
|
||||
Console.WriteLine($"Vwap 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");
|
||||
}
|
||||
return final;
|
||||
}
|
||||
|
||||
public static bool isVwapLong (List<TAReport> responses, int index, int length = 10){
|
||||
if(index < length * 2){
|
||||
return false;
|
||||
}
|
||||
|
||||
float lowCount =0;
|
||||
float highCount =0;
|
||||
decimal hh= 0;
|
||||
decimal ll = 10000000000;
|
||||
|
||||
float avgSize = 0;
|
||||
int candlesSinceLastHigh = 0;
|
||||
int greenCandlesAmount =0;
|
||||
for(int i=index; i > index-length; i--){
|
||||
candlesSinceLastHigh++;
|
||||
|
||||
if(responses[i].RSI50 > 50){
|
||||
greenCandlesAmount++;
|
||||
}
|
||||
if(responses[i].candle.High > responses[i].VwapWeekly){
|
||||
candlesSinceLastHigh=0;
|
||||
highCount++;
|
||||
|
||||
if(hh < responses[i].High){
|
||||
hh = responses[i].High;
|
||||
}
|
||||
}else if(responses[i].candle.Low < responses[i].VwapWeekly){
|
||||
lowCount++;
|
||||
|
||||
if(ll > responses[i].Low){
|
||||
ll = responses[i].Low;
|
||||
}
|
||||
}
|
||||
|
||||
avgSize += responses[i].candle.getCandleLength();
|
||||
}
|
||||
avgSize /= length;
|
||||
|
||||
TAReport curReport = responses[index];
|
||||
bool isAboveVwap = curReport.Open > curReport.VwapWeekly || curReport.Close > curReport.VwapWeekly;
|
||||
bool isSolid = IsSolid(curReport.candle) ;
|
||||
bool isGreen = curReport.RSI50 >= 50;
|
||||
bool beenAcrossVwap = (highCount / lowCount) > 0;
|
||||
bool mostylRed = greenCandlesAmount < length /3f;
|
||||
|
||||
//These did not matter
|
||||
bool closeToVwap = curReport.Open < hh && curReport.Open > ll;
|
||||
bool mostlyBelowVwap = (highCount / lowCount) < 0.3f;
|
||||
bool crossedRecently = candlesSinceLastHigh < (length/3);
|
||||
bool isLarge = curReport.candle.getCandleLength() > avgSize;
|
||||
|
||||
bool final = isGreen && isSolid && isAboveVwap && beenAcrossVwap && mostylRed;
|
||||
|
||||
if(final){
|
||||
Console.WriteLine($"Vwap(L) signal on {curReport.pair}({curReport.interval}m) : {highCount} / {lowCount} = {highCount/lowCount} , {candlesSinceLastHigh} last High");
|
||||
}
|
||||
return final;
|
||||
}
|
||||
|
|
|
|||
13
Picasso.cs
13
Picasso.cs
|
|
@ -123,9 +123,9 @@ public class Picasso{
|
|||
#endregion
|
||||
|
||||
#region VWAP
|
||||
if(reports[i].isVwapSignal){
|
||||
if(reports[i].isVwapShort){
|
||||
|
||||
string text = $"VWAP";
|
||||
string text = $"VW(S)";
|
||||
|
||||
// Position text below the candle
|
||||
PointF textPosition = new PointF(i * widthMultiplier - 15, lowVal + 20);
|
||||
|
|
@ -133,6 +133,15 @@ public class Picasso{
|
|||
img.Mutate(ctx => ctx.DrawText(text, indicatorFont, Color.Green, textPosition));
|
||||
img.Mutate(ctx=>ctx.DrawLine(Color.DarkRed, 0.5f, [new PointF(i * widthMultiplier, 0), new PointF(i * widthMultiplier, height)])); //Draw Vertical guide
|
||||
}
|
||||
if(reports[i].isVwapLong){
|
||||
string text = $"VW(L)";
|
||||
|
||||
// Position text below the candle
|
||||
PointF textPosition = new PointF(i * widthMultiplier - 15, lowVal + 20);
|
||||
|
||||
img.Mutate(ctx => ctx.DrawText(text, indicatorFont, Color.Green, textPosition));
|
||||
img.Mutate(ctx=>ctx.DrawLine(Color.DarkGreen, 0.5f, [new PointF(i * widthMultiplier, 0), new PointF(i * widthMultiplier, height)]));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region TBC
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@ namespace SignalsTest
|
|||
public decimal Stochastic = 0;
|
||||
public decimal StochasticK3 = 0;
|
||||
public float RelativeVolumeIndex = 0;
|
||||
public bool isVwapSignal = false;
|
||||
public bool isVwapShort = false;
|
||||
public bool isVwapLong = false;
|
||||
|
||||
public bool STUp = false;
|
||||
public bool TGOR=false;
|
||||
public static TAReport Generate(string _pair, int _interval, List<KlineCandleStickResponse> response, int index, List<TAReport> history)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user