Tâche terminée
Spécifications
Either first 3 indicators or next three indicators or next 3 indicators or following 3 indicators , either set of 3 indicators (from six sets) will trigger an entry
signals from all three indicators on each set must be valid , if one of three indicators in a set trigger value is not met , entry is not valid , even if another indicator in different set has valid signal.
comment on include file // where you add code
you will be provided indicators and ea to add code by pm
mql4 source codes required as part of job for testing and two weeks required to test
Each version you supply will be codded as #1 , #2 #3
Code an include file WITH 6 SETS OF 3 INDICATORS called setindicator .See attached sketch
// Signals
//DEFINE SET1, SET2 , SET3, SET4 ,SET5 AND SET6)
static bool _SET1 = false;
static bool _SET2 = false;
static bool _SET3 = false;
static bool _SET4 = false;
static bool _SET5 = false;
static bool _SET6 = false;
SET1 INDICATORS :101, 102 , 103
SET2 INDICATORS :104 ,105 ,106
SET3 INDICATORS :107 ,108 , 109
SET 4 INDICATORS :110 , 111 AND 112
SET 5 INDICATORS :113 , 114 , 115
SET 6 INDICATORS ;116 , 117 AND 118
All indicators are same template
3 functions to be coded
1)Read indicators /code indicators into INCLUDE
2)CODE SETS 6 SETS /DEFINE THEM
3)CODE SET COUNT
4)SIGNALS TO EA
CODE FUNCTION :SET COUNT
//this function will count SET INDICATOR BUY SIGNALS AND SET INDICATORS SELL SIGNALS
int _SET1_BUY = 0;
int _SET1_SELL = 0;
// if(SET1 _indicator 101 -BUY COUNT ) _BUY_++;
// if(SET1 _indicator 101 _SELL COUNT ) _SELL_++;
// if(SET1 _indicator 102 -BUY COUNT ) _BUY_++;
// if(SET1 _indicator 102 _SELL COUNT ) _SELL_++;
// if(SET1 _indicator 103 -BUY COUNT ) _BUY_++;
// if(SET1 _indicator 103 _SELL COUNT ) _SELL_++;
_buytrue = _set1buy >= 3;
_selltrue = _set1_sell >= -3;
in each set of 6 sets , code 3 custom indicators = total custom indicators = 18 , in the include file
Each set of 3 indicators , must all show true , to get valid signal to buy or sell +1/-1
all 3 indicators in a set must all be above 80 for buy signal or below - 80 for sell signal
If any set = true +1 , signal will be +1
if any set = true -1 , signal will be -1
if any set has 3 indicators as -1 ,-1 0 = signal = zero for set (MINIMUM SIGNAL = + 3 )
if any set has 3 indicators as 1 ,-1 ,1 = signal = zero for set (MINIMUM SIGNAL = - 3 )
if any set has +1, +1 and +1 = signal set = +1 (IF SET EQUALS MINIMUM SIGNAL +3 , SIGNAL = +1 , else 0)
if any set has -1 , -1 and -1 = signal set = -1 (IF SET EQUALS MINIMUM SIGNAL -3 , SIGNAL = - 1 , else 0)
//(SET1 = 3 =SIGNAL =1 ), (SET 1 = -3 ,SIGNAL = -1)
//SAME LOGIC APPLIES TO SETS 2 , 3 ,4 , 5 AND 6
Please code the sets and indicators together in same function call (see sketch include) , this will make function effective and faster (novice coders call functions in different places on ea and this type of coding makes eas confused and function calls are in a mangled state , so ea will not work) .Please do not try to reduce codes (short cuts on coding) , to save your time ,thereby making ineffective codes that dont work , this is due to missing clear function call.Each function calling each indicator must be clearly defined , and detailed in the code , and within the function call ,only then will robot function correctly.A robot does not function correctly , because robot has not been given clear instructions.
There will be function declared in mqh void InitSettings(), it will be placed into EA's init() function,
so EA runs - the function retrieves settings only once,
and there is this flag bool Isindicator Ok, if = true - that means the settings are loaded and can be used, = false - settings aren't found.
Below is a sketch include file , the intelligent coder will make a detailed include file with proper working codes for functions.The include file will be added to EA at beginning on init.
Include will coded to start with false , into EA's init() function , if include shows no true signal , ea will not waste computer memory and start again on init .
//Until a true signal is generated on init , include will not check any other filters and functions of ea.
everything will be defined correctly in the include file , so there will be no more defining to be done in ea , adding the include file into any ea , will compile ea without any errors or further function defining.
The mqh file will start with FALSE
until a TRUE signal is generated
if no true signal is generated , SIGNAL = FALSE