| 14 | namespace MetroPlex |
| 15 | { |
| 16 | public class MetroPlex : ChartStrategy |
| 17 | { |
| 18 | private Stopwatch clock = new Stopwatch(); |
| 19 | private Rectangle rc = new Rectangle() { X = 50, Y = 50, Height = 200, Width = 400 }; |
| 20 | private DateTime dtStart = DateTime.Now; |
| 21 | private String sLastTrade = String.Empty; |
| 22 | private int iFontSize = 9; |
| 23 | private int _prevBar = -1; |
| 24 | private int iPrevOrderBar = -1; |
| 25 | |
| 26 | private const String sVersion = "Beta 1.0"; |
| 27 | |
| 28 | [Display(Name = "Font Size", GroupName = "Drawing", Order = int.MaxValue)] |
| 29 | [Range(1, 90)] |
| 30 | public int TextFont { get => iFontSize; set { iFontSize = value; RecalculateValues(); } } |
| 31 | |
| 32 | private int iAdvMaxContracts = 6; |
| 33 | private int iMaxLoss = 50000; |
| 34 | private int iMaxProfit = 50000; |
| 35 | |
| 36 | [Display(Name = "Max simultaneous contracts", GroupName = "General", Order = int.MaxValue)] |
| 37 | [Range(1, 90)] |
| 38 | public int AdvMaxContracts { get => iAdvMaxContracts; set { iAdvMaxContracts = value; RecalculateValues(); } } |
| 39 | |
| 40 | [Display(GroupName = "General", Name = "Maximum Loss", Description = "Maximum amount of money lost before the bot shuts off")] |
| 41 | [Range(1, 90000)] |
| 42 | public int MaxLoss { get => iMaxLoss; set { iMaxLoss = value; RecalculateValues(); } } |
| 43 | |
| 44 | [Display(GroupName = "General", Name = "Maximum Profit", Description = "Maximum profit before the bot shuts off")] |
| 45 | [Range(1, 90000)] |
| 46 | public int MaxProfit { get => iMaxProfit; set { iMaxProfit = value; RecalculateValues(); } } |
| 47 | |
| 48 | private readonly SMA _LindaShort = new SMA() { Period = 3 }; |
| 49 | private readonly SMA _LindaLong = new SMA() { Period = 10 }; |
| 50 | private readonly SMA _LindaSignal = new SMA() { Period = 16 }; |
| 51 | |
| 52 | private readonly HMA _hma = new HMA() { }; |
| 53 | private readonly RSI _rsi = new() { Period = 14 }; |
| 54 | private readonly ParabolicSAR _psar = new ParabolicSAR(); |
| 55 | private readonly ADX _adx = new ADX() { Period = 10 }; |
| 56 | private readonly EMA fastEma = new EMA() { Period = 20 }; |
| 57 | private readonly EMA slowEma = new EMA() { Period = 40 }; |
| 58 | private readonly FisherTransform _ft = new FisherTransform() { Period = 10 }; |
| 59 | private readonly SuperTrend _st = new SuperTrend() { Period = 10, Multiplier = 1m }; |
| 60 | private readonly KAMA _kama9 = new KAMA() { ShortPeriod = 2, LongPeriod = 109, EfficiencyRatioPeriod = 9 }; |
| 61 | private readonly T3 _t3 = new T3() { Period = 10, Multiplier = 1 }; |
| 62 | |
| 63 | public MetroPlex() |
| 64 | { |
| 65 | EnableCustomDrawing = true; |
| 66 | |
| 67 | Add(_ft); |
| 68 | Add(_psar); |
| 69 | Add(_st); |
| 70 | Add(_kama9); |
| 71 | Add(_adx); |
| 72 | Add(_hma); |
| 73 | } |
nothing calls this directly
no outgoing calls
no test coverage detected