I would like to order an EA, for which I am willing to pay $100. The EA is based on the Linear Regression Curve, calculated with the Least Squares Method.
I would like the ability to input a period length for the calculation, as well as an offset modifier, to adjust the equation with which the linear regression curve is calculated.
The EA will create buy and sell orders based on offsets of the linear regression curve.
I'm uploading a sample of a code to help demonstrate the calculation. The equation demonstrates the parameters I would like the trading EA to utilize.
I want the EA to extrapolate the data from left to right, and use the formula, y = mx + b, where m and b are calculated with the Least Squares Method, and the X is the input for the length, where the X can be modified with the offset parameter.
The offsets are set in the y = mx + b equation, where the x is altered, y = m(period - 1 - offset) + b. I want the linear regression curve to be calculated at every bar, so that it is a constantly changing curve. The offset is not calculated at every bar, simply set outside the calculation of the slope and y intercept. The offset essentially just amplifies or dilutes the calculated slope at a given point.
To clarify, I do not want the line to be of a constant slope, where the slope is calculated only once for the entire line. I want the curve to be calculated at ever bar, so that it moves with every bar.
Because I want the calculation to produce a curve, and I want the data to be extrapolated from left to right, for the x parameter, the i counter runs from 0 to the period, and for the y parameter counts down in the reference bracket, Close[Period-i]. I want this calculation however to be done for every bar on the chart, which it seems requires the Bars and Indicator Counted Function. MQL4 is kind of tricky.
Additionally would like the EA to utilize a trailing stop, and a stop loss, which I can modify.
The EA should be able to buy or sell, multiple currency pairs at once, based on whichever pair fits the criteria.
The conditions that controls buy or sell orders, is the positioning of multiple sets of positive and negative offset buffers for the linear regression curve
For a sell, if the 2 day and 3 day negative offsets are below the 2 day and 3 day positive offsets, and the current price is below the weighted moving average, the bot will sell that currency pair.
For a buy, if the 2 day and 3 day negative offsets are above the 2 day and 3 day positive offsets, and the current price is above the weighted moving average, the bot will buy that currency pair.
I would also like to be able to add more buffers to the buy and sell evaluation if possible.
Hopefully the code that I am uploading is clear enough on the equation to calculate the linear regression curve, and the linear regression offsets.