Disliked{quote} Start with the pseudo code then fill it out. Below gives you a struct array of every traded symbol with it's trade history and p/l total, from that you can do further per-symbol stats. Or you could just use a simple array for names and p/l, then sort the names and p/l arrays by size, giving you an ordered list of p/l. Off the cuff untested- struct s{ string sym_name; double trades_profit[]; double trades_profit_sum; }; s stats[]; //loop through all closed trades void trade_history_symbols_sort() { int count_sym = 0;//start off with 0 symbols...Ignored
Well, it still needs some corrections, like it doesn't correctly calculates percentage. For that I need more ideas and coding, such like I need to get first deposit amount, then when I opened/closed a trade on symbol and add its profit to balance and calculate percentage and then sum up all that, it looks a big thing for me
And also I need to add function to calculate how much pips I have traded on a symbol. But overall it look great and for that thank you so much for you idea
"Rule No.1: Never lose money. Rule No.2: Never forget rule No.1." — Warren