mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-17 01:58:06 +00:00
Update main automation workflow to use wildcard for dotcover report path
This commit is contained in:
@@ -39,7 +39,7 @@ public class MovingAverageSlope_chart : Indicator {
|
||||
private bool LongTrades = true;
|
||||
|
||||
[InputParameter("Short trades", 8)]
|
||||
private bool ShortTrades = false;
|
||||
private bool ShortTrades;
|
||||
|
||||
#endregion Parameters
|
||||
|
||||
@@ -48,7 +48,7 @@ public class MovingAverageSlope_chart : Indicator {
|
||||
|
||||
///////
|
||||
private TSeries MA1, MA2;
|
||||
private LINREG_Series sMA1, sMA2;
|
||||
private SLOPE_Series sMA1, sMA2;
|
||||
private CROSS_Series sig1, sig2;
|
||||
|
||||
private bool inLong, inShort;
|
||||
@@ -276,11 +276,12 @@ public class MovingAverageSlope_chart : Indicator {
|
||||
Graphics graphics = args.Graphics;
|
||||
var mainWindow = this.CurrentChart.MainWindow;
|
||||
int leftIndex = (int)mainWindow.CoordinatesConverter.GetBarIndex(mainWindow.CoordinatesConverter.GetTime(mainWindow.ClientRectangle.Left));
|
||||
int rightIndex = (int)Math.Ceiling(mainWindow.CoordinatesConverter.GetBarIndex(mainWindow.CoordinatesConverter.GetTime(mainWindow.ClientRectangle.Right)));
|
||||
int rightIndex = (int)Math.Ceiling(mainWindow.CoordinatesConverter.GetBarIndex(mainWindow.CoordinatesConverter.GetTime(mainWindow.ClientRectangle.Right)));
|
||||
/*
|
||||
int historycount = HistoricalData.Count;
|
||||
int ymax = mainWindow.ClientRectangle.Height;
|
||||
|
||||
/*
|
||||
|
||||
for (int i = leftIndex; i <= rightIndex; i++) {
|
||||
int xi = (int)Math.Round(mainWindow.CoordinatesConverter.GetChartX(Time(Count - 1 - i)));
|
||||
int width = this.CurrentChart.BarsWidth;
|
||||
|
||||
@@ -24,7 +24,7 @@ public class JMA_chart : Indicator {
|
||||
private int Vlong = 65;
|
||||
|
||||
[InputParameter("Phase", 4, -100, 100, 1, 2)]
|
||||
private double Jphase = 0.0;
|
||||
private double Jphase;
|
||||
|
||||
#endregion Parameters
|
||||
|
||||
@@ -38,7 +38,7 @@ public class JMA_chart : Indicator {
|
||||
protected int firstOnScreenBarIndex, lastOnScreenBarIndex;
|
||||
protected HistoricalData History;
|
||||
protected int HistPeriod;
|
||||
public JMA_chart() :base() {
|
||||
public JMA_chart() {
|
||||
Name = "JMA - Jurik Moving Avg";
|
||||
Description = "Jurik Moving Average description";
|
||||
AddLineSeries(lineName: "JMA", lineColor: Color.Yellow, lineWidth: 3,lineStyle: LineStyle.Solid);
|
||||
@@ -80,8 +80,10 @@ public class JMA_chart : Indicator {
|
||||
}
|
||||
public override void OnPaintChart(PaintChartEventArgs args) {
|
||||
base.OnPaintChart(args);
|
||||
if (this.CurrentChart == null)
|
||||
if (this.CurrentChart == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
graphics = args.Graphics;
|
||||
mainWindow = this.CurrentChart.MainWindow;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class TrailingStop_chart : Indicator {
|
||||
|
||||
///////
|
||||
|
||||
public TrailingStop_chart() :base() {
|
||||
public TrailingStop_chart() {
|
||||
Name = $"ATR Trailing Stop";
|
||||
AddLineSeries(lineName: "TrailingATR Long", lineColor: Color.Yellow, lineWidth: 1,lineStyle: LineStyle.Dot);
|
||||
AddLineSeries(lineName: "Ratchet Long", lineColor: Color.Yellow, lineWidth: 3, lineStyle: LineStyle.Solid);
|
||||
@@ -91,30 +91,5 @@ public class TrailingStop_chart : Indicator {
|
||||
this.SetValue(_tslineS, lineIndex: 2);
|
||||
this.SetValue(_ratchetS, lineIndex: 3);
|
||||
}
|
||||
|
||||
public override void OnPaintChart(PaintChartEventArgs args) {
|
||||
base.OnPaintChart(args);
|
||||
if (this.CurrentChart == null) { return; }
|
||||
Graphics graphics = args.Graphics;
|
||||
var mainWindow = this.CurrentChart.MainWindow;
|
||||
int leftIndex = (int)mainWindow.CoordinatesConverter.GetBarIndex(mainWindow.CoordinatesConverter.GetTime(mainWindow.ClientRectangle.Left));
|
||||
int rightIndex = (int)Math.Ceiling(mainWindow.CoordinatesConverter.GetBarIndex(mainWindow.CoordinatesConverter.GetTime(mainWindow.ClientRectangle.Right)));
|
||||
int historycount = HistoricalData.Count;
|
||||
int ymax = mainWindow.ClientRectangle.Height;
|
||||
|
||||
/*
|
||||
for (int i = leftIndex; i <= rightIndex; i++) {
|
||||
int xi = (int)Math.Round(mainWindow.CoordinatesConverter.GetChartX(Time(Count - 1 - i)));
|
||||
int width = this.CurrentChart.BarsWidth;
|
||||
int height = (int)((equity[i+historycount].v) *proportion);
|
||||
|
||||
Brush bb = Brushes.DarkSlateGray;
|
||||
bb = (overunder[i+historycount].v>0 && LongTrades)? Brushes.Green : bb;
|
||||
bb = (overunder[i + historycount].v < 0 && ShortTrades) ? Brushes.Red : bb;
|
||||
|
||||
graphics.FillRectangle(bb, xi, ymax - height, width, height);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user