admin管理员组文章数量:1332382
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?
本文标签: forexwhy is my mt4 print statement not workingStack Overflow
版权声明:本文标题:forex - why is my mt4 print statement not working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742293985a2448349.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论