1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 using RightEdge.Common; 5 6 // This is an auto-generated file. You should not need to edit it. 7 8 public abstract class MySystemBase : SystemBase 9 { 10 private SymbolScriptCollection<MySymbolScript> _symbolScripts = new SymbolScriptCollection<MySymbolScript>(); 11 public SymbolScriptCollection<MySymbolScript> SymbolScripts 12 { 13 get { return _symbolScripts; } 14 } 15 16 public override void Startup(SystemData data) 17 { 18 base.Startup(data); 19 SymbolScripts.Initialize(this); 20 foreach (MySymbolScriptBase symbolScript in SymbolScripts) 21 { 22 symbolScript.TradingSystem = (MySystem)this; 23 symbolScript.Startup(); 24 SystemData.IndicatorManager.RegisterMembers(symbolScript, symbolScript.Symbol); 25 } 26 } 27 28 public override void NewBar() 29 { 30 base.NewBar(); 31 SymbolScripts.NewBar(); 32 } 33 34 public override void NewTick(Symbol symbol, BarData bar, TickData tick) 35 { 36 base.NewTick(symbol, bar, tick); 37 SymbolScripts.NewTick(symbol, bar, tick); 38 } 39 40 // Indicators 41 public SymbolIndicatorCollection Highest 42 { 43 get { return SystemData.Indicators["Highest"]; } 44 } 45 public SymbolIndicatorCollection Lowest 46 { 47 get { return SystemData.Indicators["Lowest"]; } 48 } 49 50 } 51 52 public class MySymbolScriptBase : SymbolScriptBase 53 { 54 public MySystem TradingSystem; 55 56 public SymbolScriptCollection<MySymbolScript> OtherSymbols 57 { 58 get { return TradingSystem.SymbolScripts; } 59 } 60 61 public ISeries Highest 62 { 63 get { return TradingSystem.SystemData.Indicators["Highest"][Symbol]; } 64 } 65 public ISeries Lowest 66 { 67 get { return TradingSystem.SystemData.Indicators["Lowest"][Symbol]; } 68 } 69 70 } 71