I am a newbie, that's it! What's the problem in this code I really don't know. 😐🙁
Your style is all over the place. There is no consistency to the indentation and brace placement. You really need to read a C++ style guide and pick an indentation style and stick to it!
Ok guys I am so sorry for that and I will improve it thanks a lot for your mention, but for God's sake let's get back to my code and find the way to do that correctly, I am really appreciated 🙏🙏🙏
king64: Ok guys I am so sorry for that and I will improve it thanks a lot for your mention, but for God's sake let's get back to my code and find the way to do that correctly, I am really appreciated 🙏🙏🙏
You will find that if you continue to post poorly formatted and difficult to parse code that those in a position to help you will ignore you.
You will find that if you continue to post poorly formatted and difficult to parse code that those in a position to help you will ignore you.
the reason is that I really didn't know how to do that and how much this is important, just like my poor coding. I try my best to do it and learn it quickly.
//+------------------------------------------------------------------+//|B1 profit calculator Function |//+------------------------------------------------------------------+double B1profit(void){
CPositionInfo pi;
CTrade trade;
double B1Prf=0;
int i,j;
for(i=0;i<CROSS_NUMBER;i++) {
for(j=0;j<MAX_LEVEL;j++){
if(pi.SelectByTicket(baseTickets[i][j])&&pi.Comment()=="B1"&&pi.PositionType()==POSITION_TYPE_BUY)
{B1Prf += pi.Profit();//+PositionGetDouble(POSITION_SWAP); //*********//commision is omited
}
}
}
return B1Prf;
}
the reason is that I really didn't know how to do that and how much this is important, just like my poor coding. I try my best to do it and learn it quickly.
Just use the styler (press ctrl + ,) and the styling is done automatically
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Please, when you quote somebody, place your reply outside of the quote box. I have edited your post to move your reply.
Your style is all over the place. There is no consistency to the indentation and brace placement. You really need to read a C++ style guide and pick an indentation style and stick to it!
Ok guys I am so sorry for that and I will improve it thanks a lot for your mention, but for God's sake let's get back to my code and find the way to do that correctly, I am really appreciated 🙏🙏🙏
You will find that if you continue to post poorly formatted and difficult to parse code that those in a position to help you will ignore you.
You will find that if you continue to post poorly formatted and difficult to parse code that those in a position to help you will ignore you.
the reason is that I really didn't know how to do that and how much this is important, just like my poor coding. I try my best to do it and learn it quickly.
the reason is that I really didn't know how to do that and how much this is important, just like my poor coding. I try my best to do it and learn it quickly.
Just use the styler (press ctrl + ,) and the styling is done automatically