Jump to content
Tom Next - Daytrading Community

KB macht Sachen


Kleinerbroker

Recommended Posts

Ich versuche Formate zu wahren =>

 

//+-----------------------------------------------------------------------------------------------+
//|                                      Ernten_Goodtime.mqh                                      |
//|                           The code should be used for Ernten only                             |
//+-----------------------------------------------------------------------------------------------+
//+-----------------------------------------------------------------------------------------------+
//|   function  :  checks if EA is allowed to trade or off-time                                   |
//+-----------------------------------------------------------------------------------------------+
                                                //                                               |
int GoodTime()                                   //                                               |
 {                                              //                                               |
  if((Tradinghour1 <= Hour()) && (Tradinghour2 > Hour()) ||         //                           |
     (Tradinghour3 <= Hour()) && (Tradinghour4 > Hour()) ||         //                           |
     (Tradinghour5 <= Hour()) && (Tradinghour6 > Hour()))           //                           |
                                                //                                               |
      return(1);                                //                                               |
     else                                       //                                               |
      return(0);                                //                                               |
 }                                              //                                               |
//------------------------------------------------------------------------------------------------+

 

Das ist ohne RTE

 

KB

Link to comment
Share on other sites

und nun mit dem RTE :

 

//+-----------------------------------------------------------------------------------------------+
//|                                  	Ernten_Goodtime.mqh                                  	|
//|                       	The code should be used for Ernten only                         	|
//+-----------------------------------------------------------------------------------------------+
//+-----------------------------------------------------------------------------------------------+
//|   function  :  checks if EA is allowed to trade or off-time                               	|
//+-----------------------------------------------------------------------------------------------+
                                            	//                                           	|
int GoodTime()                               	//                                           	|
 {                                          	//                                           	|
  if((Tradinghour1 <= Hour()) && (Tradinghour2 > Hour()) ||     	//                       	|
 	(Tradinghour3 <= Hour()) && (Tradinghour4 > Hour()) ||     	//                       	|
 	(Tradinghour5 <= Hour()) && (Tradinghour6 > Hour()))       	//                       	|
                                            	//                                           	|
  	return(1);                            	//                                           	|
 	else                                   	//                                           	|
  	return(0);                            	//                                           	|
 }                                          	//                                           	|
//------------------------------------------------------------------------------------------------+

 

Und was lernt der KB ?

 

Ohne RTE ist besser als mit RTE .

 

:pfue:

 

KB

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...