Calculate daily maximum loss

 
HI good day everyone please help me i am tryna say in this logic to stop loss at a certain equity loss level see my code i dont know what im doing wrong here So in My code i have calculated daily trades maximum profit so i called this function to use for maximum daily profit it worked but when i invert logic for loss to close all trades when certain loss has been incurred already Please help
 

Why don't you use any comments?

It makes it so much simpler for other persons to read and understand your code.

Also for you, if f.e. you have to change something on your code a year later. 

I really wanted to help you but I have not the time to read the whole whole code and try to understand what you have coded...


https://www.cprogramming.com/tutorial/comments.html

How and Why to Comment C and C++ Code - Cprogramming.com
  • www.cprogramming.com
Learn why to comment your C and C++ code--and how you should do it.
 
Lukas Roth #:

Why don't you use any comments?

It makes it so much simpler for other persons to read and understand your code.

Also for you, if f.e. you have to change something on your code a year later. 

I really wanted to help you but I have not the time to read the whole whole code and try to understand what you have coded...


https://www.cprogramming.com/tutorial/comments.html

thanks mate for your willingness!
 
Ransom Dikpen Egene:
HI good day everyone please help me i am tryna say in this logic to stop loss at a certain equity loss level see my code i dont know what im doing wrong here So in My code i have calculated daily trades maximum profit so i called this function to use for maximum daily profit it worked but when i invert logic for loss to close all trades when certain loss has been incurred already Please help
extern double MaxDailyLoss = -200;
 
Можно просто не много изменить условие: bool close4loss = Calc_Today_Closed_Profits(_Symbol)+Calc_OpenOrders_Profits(_Symbol)<=-MaxDailyLoss;
Reason: