The original Artificial Intelligence EA can be found at http://codebase.mql4.com/755 .
I have found a modified version where some one added 2 extra perceptrons ( making it a total of 3) to the original 1 perceptron.
Can someone show me how to substitute the basic strategy of AC with other indicators ?
double perceptron1 ()
{
double w1 = x1 - 100.0;
double w2 = x2 - 100.0;
double w3 = x3 - 100.0;
double w4 = x4 - 100.0;
// This is the original strategy of AC { Accelerator Oscillator}
double a1 = iAC ( Symbol(), 0, 0 );
double a2 = iAC ( Symbol(), 0, 7 );
double a3 = iAC ( Symbol(), 0, 14 );
double a4 = iAC ( Symbol(), 0, 21 );
return(w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4);
I would like to switch the indicator to Stochastic but am have problem with the parameters
double perceptron2 ()
{
double w1 = y1 - 100;
double w2 = y2 - 100;
double w3 = y3 - 100;
double w4 = y4 - 100;
// I am trying to substitute the original AC indicator with Stochastic but could not get the parameter correct, can someone please help me ?
double a1 = iStochastic ( Symbol(), 0, 5,3,3,1, PRICE_CLOSE, 0 );
double a2 = iStochastic ( Symbol(), 0, 5,3,3,1, PRICE_CLOSE, 7 );
double a3 = iStochastic ( Symbol(), 0, 5,3,3,1, PRICE_CLOSE, 14 );
double a4 = iStochastic ( Symbol(), 0, 5,3,3,1, PRICE_CLOSE, 21 );
return(w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4);
I have intention of substituting original indicators with custom made one, the one Ihave in mind is ULTRA_TREND ( http://www.forexfactory.com/showthread.php?t=35414 @ post #9 ). Can some help show me how to change the code ?
If possible can someone add in the money management code too ?
I have found a modified version where some one added 2 extra perceptrons ( making it a total of 3) to the original 1 perceptron.
Can someone show me how to substitute the basic strategy of AC with other indicators ?
double perceptron1 ()
{
double w1 = x1 - 100.0;
double w2 = x2 - 100.0;
double w3 = x3 - 100.0;
double w4 = x4 - 100.0;
// This is the original strategy of AC { Accelerator Oscillator}
double a1 = iAC ( Symbol(), 0, 0 );
double a2 = iAC ( Symbol(), 0, 7 );
double a3 = iAC ( Symbol(), 0, 14 );
double a4 = iAC ( Symbol(), 0, 21 );
return(w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4);
I would like to switch the indicator to Stochastic but am have problem with the parameters
double perceptron2 ()
{
double w1 = y1 - 100;
double w2 = y2 - 100;
double w3 = y3 - 100;
double w4 = y4 - 100;
// I am trying to substitute the original AC indicator with Stochastic but could not get the parameter correct, can someone please help me ?
double a1 = iStochastic ( Symbol(), 0, 5,3,3,1, PRICE_CLOSE, 0 );
double a2 = iStochastic ( Symbol(), 0, 5,3,3,1, PRICE_CLOSE, 7 );
double a3 = iStochastic ( Symbol(), 0, 5,3,3,1, PRICE_CLOSE, 14 );
double a4 = iStochastic ( Symbol(), 0, 5,3,3,1, PRICE_CLOSE, 21 );
return(w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4);
I have intention of substituting original indicators with custom made one, the one Ihave in mind is ULTRA_TREND ( http://www.forexfactory.com/showthread.php?t=35414 @ post #9 ). Can some help show me how to change the code ?
If possible can someone add in the money management code too ?
Attached File(s)
AI_PERCEPTRON's_v1.mq4
7 KB
|
1,357 downloads