TGOR
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 81 KiB |
BIN
SignalsTestCmd/AVAXUSDT.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 75 KiB |
@@ -79,6 +79,8 @@ namespace SignalsTest
|
|||||||
decimal max = 0;
|
decimal max = 0;
|
||||||
decimal min = 100000000;
|
decimal min = 100000000;
|
||||||
decimal maxVol = 0;
|
decimal maxVol = 0;
|
||||||
|
|
||||||
|
|
||||||
for(int i=0; i < candles.Count; i++){
|
for(int i=0; i < candles.Count; i++){
|
||||||
|
|
||||||
TAReport report = TAReport.Generate(pair, Utils.GetMinutesForInterval(interval) ,candles, i,reports);
|
TAReport report = TAReport.Generate(pair, Utils.GetMinutesForInterval(interval) ,candles, i,reports);
|
||||||
@@ -93,6 +95,7 @@ namespace SignalsTest
|
|||||||
maxVol = candles[i].Volume;
|
maxVol = candles[i].Volume;
|
||||||
}
|
}
|
||||||
reports.Add(report);
|
reports.Add(report);
|
||||||
|
|
||||||
}
|
}
|
||||||
Console.WriteLine($"Drawing chart for {reports.Count} candles, Coin: {symbol}, ceil:{max}, floor:{min}");
|
Console.WriteLine($"Drawing chart for {reports.Count} candles, Coin: {symbol}, ceil:{max}, floor:{min}");
|
||||||
|
|
||||||
@@ -108,12 +111,16 @@ namespace SignalsTest
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isStSwitch){
|
if(isStSwitch){
|
||||||
Picasso.DrawChart(reports, max ,min, maxVol, symbol);
|
Picasso.DrawChart(reports, max ,min, maxVol, symbol);
|
||||||
await Messenger.instance.SendLastChart(filename:symbol);
|
await Messenger.instance.SendLastChart(filename:symbol);
|
||||||
await Messenger.instance.SendMessage($"`{symbol}` switched the SuperTrend lines. Current price: {reports[reports.Count-1].Close}");
|
await Messenger.instance.SendMessage($"`{symbol}` switched the SuperTrend lines. Current price: {reports[reports.Count-1].Close}");
|
||||||
}
|
}
|
||||||
|
if(reports[reports.Count-1].TGOR){
|
||||||
|
Picasso.DrawChart(reports, max ,min, maxVol, symbol);
|
||||||
|
await Messenger.instance.SendLastChart(filename:symbol);
|
||||||
|
await Messenger.instance.SendMessage($"`{symbol}` dipped in a bull run. Current price: {reports[reports.Count-1].Close}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async void KeepUpdatingCandles()
|
async void KeepUpdatingCandles()
|
||||||
|
|||||||
BIN
SignalsTestCmd/ENAUSDT.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
SignalsTestCmd/HIVEUSDT.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
@@ -17,7 +17,7 @@ namespace SignalsTest
|
|||||||
|
|
||||||
private static Messenger m_instance;
|
private static Messenger m_instance;
|
||||||
public static Messenger instance { get { if (m_instance == null) { m_instance = new Messenger(); } return m_instance; } }
|
public static Messenger instance { get { if (m_instance == null) { m_instance = new Messenger(); } return m_instance; } }
|
||||||
public const string chatId = "@doralockscryptosignals";
|
public const string chatId = "@SignalTestPrivate";
|
||||||
//prod:doralockscryptosignals
|
//prod:doralockscryptosignals
|
||||||
//test:SignalTestPrivate
|
//test:SignalTestPrivate
|
||||||
|
|
||||||
|
|||||||
52
SignalsTestCmd/Patterns.cs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
using BinanceExchange.API.Models.Response;
|
||||||
|
|
||||||
|
public static class Patterns{
|
||||||
|
public static bool GetTGOR(List<KlineCandleStickResponse> responses, int curIndex){
|
||||||
|
if(curIndex < 10){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int greenCount =0;
|
||||||
|
|
||||||
|
for(int i=curIndex-4; i <= curIndex; i++){
|
||||||
|
|
||||||
|
if(responses[i].Close < responses[i].Open){
|
||||||
|
if(greenCount > 2){
|
||||||
|
//Red after 3 greens
|
||||||
|
int bullRunFlag = 0;
|
||||||
|
//This is an abomniation
|
||||||
|
if(responses[i-1].Close > responses[i-2].Close){
|
||||||
|
bullRunFlag++;
|
||||||
|
}
|
||||||
|
if(responses[i-2].Close > responses[i-3].Close){
|
||||||
|
bullRunFlag++;
|
||||||
|
}
|
||||||
|
if(responses[i-3].Close > responses[i-4].Close){
|
||||||
|
bullRunFlag++;
|
||||||
|
}
|
||||||
|
if(responses[i-4].Close > responses[i-5].Close){
|
||||||
|
bullRunFlag++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(responses[i-5].Close > responses[i-6].Close){
|
||||||
|
bullRunFlag++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(bullRunFlag > 2 && responses[i-1].Close < responses[i-1].Open){//It was a bull run
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
greenCount =0;
|
||||||
|
}else{
|
||||||
|
greenCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,11 +34,11 @@ public class Picasso{
|
|||||||
|
|
||||||
PointF[] rangePoints = new PointF[2];
|
PointF[] rangePoints = new PointF[2];
|
||||||
|
|
||||||
float openVal2 = (float)(reports[i].candle.High-min)* heightMultiplier;
|
float highVal = (float)(reports[i].candle.High-min)* heightMultiplier;
|
||||||
float closeVal2 = (float)(reports[i].candle.Low-min)* heightMultiplier;
|
float lowVal = (float)(reports[i].candle.Low-min)* heightMultiplier;
|
||||||
|
|
||||||
rangePoints[0] = new PointF(i * widthMultiplier, openVal2+ candlesOffset);
|
rangePoints[0] = new PointF(i * widthMultiplier, highVal+ candlesOffset);
|
||||||
rangePoints[1] = new PointF(i * widthMultiplier, closeVal2+ candlesOffset);
|
rangePoints[1] = new PointF(i * widthMultiplier, lowVal+ candlesOffset);
|
||||||
|
|
||||||
PointF[] volumePoints = new PointF[2];
|
PointF[] volumePoints = new PointF[2];
|
||||||
volumePoints[0] = new PointF(i * widthMultiplier, 0);
|
volumePoints[0] = new PointF(i * widthMultiplier, 0);
|
||||||
@@ -52,6 +52,13 @@ public class Picasso{
|
|||||||
DrawLine(candleColor, 10, volumePoints)
|
DrawLine(candleColor, 10, volumePoints)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if(reports[i].TGOR){
|
||||||
|
PointF[] tgorPoints = new PointF[2];
|
||||||
|
tgorPoints[0] = new PointF(i * widthMultiplier, lowVal+ candlesOffset);
|
||||||
|
tgorPoints[1] = new PointF(i * widthMultiplier, lowVal- 15+ candlesOffset);
|
||||||
|
img.Mutate(ctx=>ctx.DrawLine(Color.Blue, 15, tgorPoints));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// Console.WriteLine("Getting paths");
|
// Console.WriteLine("Getting paths");
|
||||||
// object t = GetPropByName(reports[reports.Count- 1], "SMA7");
|
// object t = GetPropByName(reports[reports.Count- 1], "SMA7");
|
||||||
@@ -66,7 +73,7 @@ public class Picasso{
|
|||||||
//NewChart
|
//NewChart
|
||||||
FontFamily fontFamily;
|
FontFamily fontFamily;
|
||||||
float TextFontSize = 64f;
|
float TextFontSize = 64f;
|
||||||
string TextFont = "Arial";
|
string TextFont = "Noto Sans Mono";
|
||||||
if (!SystemFonts.TryGet(TextFont, out fontFamily))
|
if (!SystemFonts.TryGet(TextFont, out fontFamily))
|
||||||
throw new Exception($"Couldn't find font {TextFont}");
|
throw new Exception($"Couldn't find font {TextFont}");
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 79 KiB |
@@ -40,7 +40,7 @@ namespace SignalsTest
|
|||||||
public decimal RSI = 0;
|
public decimal RSI = 0;
|
||||||
|
|
||||||
public bool STUp = 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)
|
public static TAReport Generate(string _pair, int _interval, List<KlineCandleStickResponse> response, int index, List<TAReport> history)
|
||||||
{
|
{
|
||||||
TAReport report = new TAReport();
|
TAReport report = new TAReport();
|
||||||
@@ -136,6 +136,7 @@ namespace SignalsTest
|
|||||||
report.STUp = currentTrendUp;
|
report.STUp = currentTrendUp;
|
||||||
report.ST = currentTrendUp ? finalLowerBand : finalUpperBand;
|
report.ST = currentTrendUp ? finalLowerBand : finalUpperBand;
|
||||||
|
|
||||||
|
report.TGOR= Patterns.GetTGOR(response, index);
|
||||||
|
|
||||||
return report;
|
return report;
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 92 KiB |
@@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("SignalsTestCmd")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("SignalsTestCmd")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+4a8f2d608b1f1ca133831ccdead689f8d57ae5f4")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+24882fcb14b43473cc0bacefa4b7cdd7d36eeea9")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("SignalsTestCmd")]
|
[assembly: System.Reflection.AssemblyProductAttribute("SignalsTestCmd")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("SignalsTestCmd")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("SignalsTestCmd")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
ca0f5c6656c28599aa5c69610c0b127117543bcbf3a50182e0f73d06e5e5f4ec
|
4ce3378aafaf5daa560070e1168e48342c740decf5b68170cbe21ef852cf8fc3
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
92a7031d8d445a12a9b29fae76ea8a01ddef5301a6c958e22e005680814b2706
|
47c88f9b58c13d3ba4426410e40af2be346aa98297b9f7bd8f5788848c76156b
|
||||||
|
|||||||