I use this code to create a write into a new created csv file :
sw = File.AppendText(path);
sw.WriteLine("Entry Price, " + "Quantity, " + "SL Level, " + "TP Level, " + "Side");
sw.WriteLine(PositionAccount.AveragePrice + "," + QtyMini + "," + ShortSL + "," + ShortTP + "," + "Short");
sw.Close();
| Entry Price | Quantity | SL Level | TP Level | Side |
| 4780.5 | 4 | 4789.461 | 4762.578 | Short |
Second things is that I want to remove this excel file at the end of trading day, so is there a method called
sw.Remove();
Thank you very much for your help and permanent support

Comment