This has to be a stupid simple mistake that I'm not seeing. I have summary section, which has variables declared double:
/************************************************************************************/
bool HistoryFile(int Pos_Count, double Total_Pips, int Win_Count, double Run_Profit )
/************************************************************************************/
{
double Run_Hours = 0, Win_Percent = 0, Pips_Per_Pos = 0, Pips_Per_Win = 0, Wins_Per_Hour = 0, Pips_Per_Hour = 0, Pips = 0;
Run_Hours = NormalizeDouble(( TimeCurrent() - Start_Time ) / 3600,1);
if ( Pos_Count > 0 )
{
Win_Percent = NormalizeDouble(Win_Count/Pos_Count*100,1);
Pips_Per_Pos = NormalizeDouble(Total_Pips/Pos_Count,1);
}
Print("HistoryFile Win_Count=",Win_Count,", Pos_Count=",Pos_Count,", (Win_Count/Pos_Count)=",(Win_Count/Pos_Count),", (Win_Count/Pos_Count)*100=",(Win_Count/Pos_Count)*100);
Here's what I get in the log: 2024.11.21 21:56:50.607 2022.09.27 23:59:54 Pips_After_Cross_TS6 GBPUSD,M1: HistoryFile Win_Count=5, Pos_Count=26, (Win_Count/Pos_Count)=0, (Win_Count/Pos_Count)*100=0
If it knows that in this run there were 26 positions and 5 of them were winners, why isn't it printing out the percentage correctly? What am I missing here?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742293985a4416741.html
评论列表(0条)