my signals are pushed as an enum value which is stored as _TradeSignal
I also store a value for _LastSignals[0] as a list, so that I can look up what signals my last trades were...
I was previously storing a pubic double for each signal type and then using the following formula to keep updating the performance history of each signal, whenever a trade had been closed
MySignalPerformance = MySignalPerformance + (SystemPerformance.AllTrades.TradesPerformance.Tic ks.CumProfit - lastbalance);
i feel like there is a more efficient way maybe a list or a way of storing values in the method? I haven't been programming long and I want this template to be as efficient as possible moving forward so I am using it as a learning opportunity... I am just converting my last strategy in to a template for other strategies and tidying up the concepts and making them more efficient and easy to read, it is bit of an unmanaged mode for managed mode, trying to get the best of both worlds for rithmic connections.
curious how an experienced programmer would approach this problem?
i want to store a bunch of performance metrics for evaluation so being efficient as possible is crucial
i am not sure if there is an efficient way to this without having a bunch of repeating code for each signal... i figure there is...
maybe autogenerate a list of doubles for each enum value and delete the list on termination?
is it possible to generate the list using a for each loop? so that enum 0 is list item [0]?
another idea would be to create an output method for performance like private static Performance(profit profit, winrate winrate, etc etc)
I have only just got my head around creating my own methods and lists...
Comment