Advertisement
Maurizio-Ciullo

Study Strategy Tabella Report Quick-Performance QTA

Jun 23rd, 2023
1,625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                        
  2.                         // Study Strategy Tabella Report Quick-Performance QTA //
  3.                         // Creare Uno Strategy //
  4.  
  5.  
  6. // Vedi Scrren In Cartella ...
  7.  
  8.  
  9. // Attivare il commentary su tradestaton: View / Application Toolbars / Customize / Toolbars E attivare Charting-Tools-Classic
  10. // Andare su toobars-options "vicino a settings" Chart Analysys Toolbars / "cercare Analysys Commentari e attivarlo"
  11.  
  12.  
  13. {Questo codice applicato alla fine del nostro trading system ci riporterà nel Commentary delle quick performance della strategia.
  14.  
  15. E’ molto utile quando siamo in fase di sviluppo di una strategia, per vedere velocemente come si comporta senza necessariamente aprire ogni volta il report del backtest.}
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24. If LastBarOnChart then begin
  25.     Commentary(
  26.         "<table style='width:100%; border-collapse: collapse;'>",
  27.         "<tr style='background-color: #f2f2f2;'><th style='width:60%; padding: 10px; border: 1px solid #ddd;'>Metric</th><th style='width:40%; padding: 10px; border: 1px solid #ddd;'>Value</th></tr>",
  28.         "<tr><td style='padding: 10px; border: 1px solid #ddd;'>Symbol</td><td style='padding: 10px; border: 1px solid #ddd;'>", getsymbolname, "</td></tr>",
  29.         "<tr style='background-color: #f2f2f2;'><td style='padding: 10px; border: 1px solid #ddd;'>Net Profit</td><td style='padding: 10px; border: 1px solid #ddd;'>", NetProfit, "</td></tr>",
  30.         "<tr><td style='padding: 10px; border: 1px solid #ddd;'>Gross Profit</td><td style='padding: 10px; border: 1px solid #ddd;'>", GrossProfit, "</td></tr>",
  31.         "<tr style='background-color: #f2f2f2;'><td style='padding: 10px; border: 1px solid #ddd;'>Gross Loss</td><td style='padding: 10px; border: 1px solid #ddd;'>", GrossLoss, "</td></tr>",
  32.         "<tr><td style='padding: 10px; border: 1px solid #ddd;'>Max Drawdown %</td><td style='padding: 10px; border: 1px solid #ddd;'>", maxiddrawdown, "</td></tr>",
  33.         "<tr style='background-color: #f2f2f2;'><td style='padding: 10px; border: 1px solid #ddd;'>Total Trades</td><td style='padding: 10px; border: 1px solid #ddd;'>", TotalTrades:0:0, "</td></tr>",
  34.         "<tr><td style='padding: 10px; border: 1px solid #ddd;'>Average Trade Net Profit</td><td style='padding: 10px; border: 1px solid #ddd;'>", (NetProfit / TotalTrades), "</td></tr>",
  35.         "<tr style='background-color: #f2f2f2;'><td style='padding: 10px; border: 1px solid #ddd;'>Percent Profitable</td><td style='padding: 10px; border: 1px solid #ddd;'>", percentprofit:0:1, "%</td></tr>",
  36.         "<tr><td style='padding: 10px; border: 1px solid #ddd;'>Profit Factor</td><td style='padding: 10px; border: 1px solid #ddd;'>", (grossprofit /absvalue(grossloss)), "</td></tr>",
  37.         "</table>"
  38.     );
  39. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement