Could anyone tell me the operation principle of this procedure

 

extern int x1 = 135;
extern int x2 = 127;
extern int x3 = 16;
extern int x4 = 93;

-----------------

if(perceptron() > 0)
{ //long

Print("long");
ticket = OrderSend(Symbol(), OP_BUY, lots, Ask, 3, Bid - sl * Point, 0, "AI人工智慧單作多",
MagicNumber, 0, Blue);
//---------------------------

------------------

double perceptron()

{
double w1 = x1 - 100;
double w2 = x2 - 100;
double w3 = x3 - 100;
double w4 = x4 - 100;
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);
}
//+------------------------------------------------------------------+

it decide to buy or sell

tks

 
peter579 wrote >>

double perceptron()

{
double w1 = x1 - 100;
double w2 = x2 - 100;
double w3 = x3 - 100;
double w4 = x4 - 100;
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);
}
//+------------------------------------------------------------------+

it decide to buy or sell

tks

Dear peter579,

It is a calculation of output value of neural network and it is called perceptron in neural network. Usually, the output value will between +1 and -1 but it is not a must. For the decision of buy or sell, it depends on how you training the neural network. For buy signal, the output value will be 1 if the network trained to buy is equal to +1. If it is trained to equal -1, it will give -1 for a buy signal. Usually, the output value not neccessary be absolute +1 or -1 as buy or sell signal. It giving a degree of a signal to be activate, for example, a output value of 0.9 we also take it as buy signal. It depends.

If you want to know more about perceptron, do a search on Google. A lot of resources is on the net.

 
brother3th wrote >>

Dear peter579,

It is a calculation of output value of neural network and it is called perceptron in neural network. Usually, the output value will between +1 and -1 but it is not a must. For the decision of buy or sell, it depends on how you training the neural network. For buy signal, the output value will be 1 if the network trained to buy is equal to +1. If it is trained to equal -1, it will give -1 for a buy signal. Usually, the output value not neccessary be absolute +1 or -1 as buy or sell signal. It giving a degree of a signal to be activate, for example, a output value of 0.9 we also take it as buy signal. It depends.

If you want to know more about perceptron, do a search on Google. A lot of resources is on the net.

How are the values of x1, x2, x3, and x4 typically derived?

 
principle ? sum of some weighted AC indicators.
 

could any one tell me how to calculate AC

in help

double iAC( string symbol, int timeframe, int shift)
Calculates the Bill Williams' Accelerator/Decelerator oscillator.

Parameters:

symbol - Symbol name of the security on the data of which the indicator will be calculated. NULL means the current symbol.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

Sample:
  double result=iAC(NULL, 0, 1);

i need to assure ac 's calculatation

AC bar chart is the difference between the value of 5/34 of the driving force
bar chart and 5-period simple moving average, taken from that bar chart.


AO = SMA(median price, 5)-SMA(median price, 34)

AC = AO-SMA(AO, 5)

in my back-test in eur-usa in 1h among 4year(2005~2009, the procedure is useful but need more adjusting...

(Fund is 10000)

can anyone share your adjusting....

 
jingodelcuyo wrote >>

How are the values of x1, x2, x3, and x4 typically derived?

The values of x1, x2, x3 and x4 are calculated through a set of training procedure. Here is the related EA 'Automated Trading System "Сombo"' . It have very similar structure but not the same. Please have a look and have fun.

Reason: