Thread: How to code?
View Single Post
  #1020 (permalink)  
Old 06-10-2008, 10:30 PM
IN10TION's Avatar
IN10TION IN10TION is offline
Senior Member
 
Join Date: Mar 2007
Posts: 658
Blog Entries: 1
IN10TION is on a distinguished road
these are not comments, this is code.
they are a part of your if() statement.

if(SellCondition){
...
return(0);
}

if(SellCondition==true){
...
return(0);
}

both statements are ok, you can use one of them...
but see that every if() statement close with }
it doesn't show in your code that you provide here.

other example:
if(a==b){c=1; d=2; return(0);}


Quote:
Originally Posted by payback View Post
one stupid question everything inside the {} is your comment or i have to write it? and why? why {;} and not {}; ?
also can i still use this statment right?

PHP Code:
if(SellCondition)
      {
         
ticket        subOpenOrder(OP_SELL,NewStopLossSell,TakeProfit,TicketComment); // open SELL order
         
subCheckError(ticket,"SELL");
         
LastTrade     "SELL";
         return(
0); 
or i have to write:

PHP Code:
if(SellCondition true)
      {
         
ticket        subOpenOrder(OP_SELL,NewStopLossSell,TakeProfit,TicketComment); // open SELL order
         
subCheckError(ticket,"SELL");
         
LastTrade     "SELL";
         return(
0); 
Reply With Quote