Abhijeet Agrawal

Abhijeet Agrawal

  • 1.9k
  • 16
  • 166

Want to change rules to be generic and should pass the test

Sep 30 2019 3:41 AM
Want to Fix method BuySellSignalExtensions.CalculateBuySellSignal. II have to define buy and sell rules. There are data files available. When I run Console.sln, the program will print out outputs. Please read the README if you want some background into what previous devs have asked me. 

running profit: 0.30 cost and profit: -21.84 last bought: 22.14 sold count: 3 - ATSG$0.20$.csv
running profit: 1.265 cost and profit: -17.945 last bought: 19.21 sold count: 2 - CORE$1.10$.csv
running profit: 0 cost and profit: 0 last bought: none sold count: 0 - EMD$0.10$.csv
running profit: 0 cost and profit: 0 last bought: none sold count: 0 - FAT$0.00$.csv
running profit: 0.10 cost and profit: -19.40 last bought: 19.5 sold count: 1 - JBLU$0.10$.csv
running profit: 0 cost and profit: -8.5 last bought: 8.5 sold count: 0 - MGI$0.14$.csv
running profit: 0.295 cost and profit: 0.295 last bought: none sold count: 2 - QUAD$0.25$.csv
running profit: 0 cost and profit: -6.57 last bought: 6.57 sold count: 0 - RRD$0.30$.csv
running profit: 59.588332 cost and profit: -6500.993486 last bought: 6560.581818 sold count: 4 - ZT1$48.05$.csv
running profit: 1183.63 cost and profit: -7302.11 last bought: 8485.74 sold count: 54 - ZT2$1183.63$.csv
running profit: 0.04 cost and profit: -6512.51 last bought: 6512.55 sold count: 2 - ZT3$0.04$.csv
running profit: 813.01 cost and profit: -6561.99 last bought: 7375 sold count: 52 - ZT4$813.01$.csv
 
Please help me with optimize code suggestion ASAP . It is built in VS2015

Attachment: ProgramToOptimize.zip

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (4)