Update main automation workflow to use wildcard for dotcover report path

This commit is contained in:
Miha Kralj
2023-05-04 08:40:37 -07:00
parent 5e7ba2427e
commit 56f8db2949
89 changed files with 1721 additions and 1356 deletions
+5 -1
View File
@@ -12,6 +12,8 @@ EQUITY - Generates P&L portfolio based on trades signals and equity prices
//optional: long, short, long&short
//optional: warmup period: warmup
/*
public class EQUITY_Series : Single_TSeries_Indicator {
readonly TSeries inmarket; //for every bar
private readonly TSeries _price;
@@ -84,4 +86,6 @@ public class EQUITY_Series : Single_TSeries_Indicator {
inmarket.Add((TValue.t, (double)_inmarket));
base.Add((TValue.t, _equity), update, _NaN);
}
}
}
*/
+34
View File
@@ -0,0 +1,34 @@
namespace QuanTAlib;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data;
using System.Linq;
public enum OType {
NIL = 0, // No position
BTO = 1, // Buy to Open
STC = 2, // Sell to Close
STO = 3, // Sell to Open
BTC = 4, // Buy to Close
END = 5, // Exit the trade
}
public class TOrders : List<(DateTime t, OType o)> {
public void Add((DateTime t, OType o) TOrder, bool update = false)
{
if (update) { this[^1] = TOrder; }
else { base.Add(TOrder); }
OnEvent(update);
}
protected virtual void OnEvent(bool update = false) {
Pub?.Invoke(this, new TSeriesEventArgs { update = update }); }
public delegate void NewDataEventHandler(object source, TSeriesEventArgs args);
public event NewDataEventHandler Pub;
}