Advertisement
Maurizio-Ciullo

Indicatore Export Trade List On Csv

Dec 20th, 2023
822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                             // Export Trade List On Csv //
  2.  
  3.  
  4. // Sul file .csv carico: Date/Time/Open/High/Low /Equity/Volume Per una questione di caricamento su tradestatio... . Apro il grafico, clicco su una candela 2 volte e nelle impostazioni style clicco su line on close.
  5.                                                                                
  6.  
  7. Vars:
  8.     mp(0),
  9.     formattedDate(""),
  10.     formattedTime(""),
  11.     dateTimeString("");
  12.  
  13. mp = marketposition;
  14.  
  15. if mp[0] <> mp[1] and mp[0] <> 0 then begin
  16.     // Formatta la data nel formato "MM-dd-yyyy"
  17.     formattedDate = FormatDate("dd-MM-yyyy", ElDateToDateTime(Date));
  18.    
  19.     // Formatta l'ora nel formato "00:00:00"
  20.     formattedTime = BarDateTime.Format("%H:%M:%S");
  21.    
  22.     // Combina data e ora nel formato richiesto
  23.     dateTimeString = formattedDate + "," + formattedTime;
  24.    
  25.     // Stampa nel file CSV
  26.     Print(File("C:\Users\Utente\Desktop\Equity Control\Tradestation\Swing Trend Trailing\Exports\Export_Equity.csv"), dateTimeString, ",", open, ",", high, ",", low, ",", NumToStr(NetProfit, 2) , Volume, ",");
  27. end;
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement