Need help making an EA

 

I have found a system that would work well as an EA but i have absolutely no knowledge of programming so could someone please help me out?

This is the outline of the system im using:

30min Chart

A RSI that is set to 45, with a line of 50(the standard is 70 and 30)

A 5 Period SMA.

When the RSI line crosses above 50 and reaches 52 AND the price is 5 pips or more above the moving average I buy. To close the position the RSI line has to cross below 50 and reach 48 AND the price must be 5 pips below the moving average. Visa versa for a sell position. Basically when one position is closed, another is opened in the opposite direction. The EA must also only be set to have a maximium of one position open at a time.

If an EA can be made to do this and someone is willing i would very much appreciate that

FibzY.

 
FibzY:
I have found a system that would work well as an EA but i have absolutely no knowledge of programming so could someone please help me out?

This is the outline of the system im using:

30min Chart

A RSI that is set to 45, with a line of 50(the standard is 70 and 30)

A 5 Period SMA.

When the RSI line crosses above 50 and reaches 52 AND the price is 5 pips or more above the moving average I buy. To close the position the RSI line has to cross below 50 and reach 48 AND the price must be 5 pips below the moving average. Visa versa for a sell position. Basically when one position is closed, another is opened in the opposite direction. The EA must also only be set to have a maximium of one position open at a time.

If an EA can be made to do this and someone is willing i would very much appreciate that

FibzY.

Thank you. The 5 pips above or below the SMA, is that the close of the 30 min bar or prize at any time?

 

Hi aelimian,

Its price at any time.

 

This is my attempt at coding this into and EA.

Please backtest it (including visually to check if it is ok)

Files:
fibzy.mq4  3 kb
 

Hi mangman,

Thanks for your efforts. I tested it and the results were not good. By looking at the graph, none of the entry and exit points matched up with the RSI criteria that my system uses, which explains the results as the RSI is my main indicator.

I tried looking at the code but that just confused me. Are you sure you set it to buy when the RSI line is at 52, and close the position when the RSI line is at 48, which will also trigger a sell position, and visa versa if it was a sell position?

Thanks again for your efforts.

 

Hi,

I tried to modify the code,

but the performance seems not good,

Regs,

popok_sakti

Files:
fibzy_1.mq4  3 kb
 

Looks like the first one was set to enter at the 50 cross, but the second has been modified to 48 52 entries.

 
Mazoem:
Looks like the first one was set to enter at the 50 cross, but the second has been modified to 48 52 entries.

Yes, As Fib said that the system should take long position when the RSI cross from 50 to 52 and short when RSI cross from 50 to 48

Regs,

popok_sakti

 

I tested the modified EA, and its not right either.

I backtested for a year and it only took 2 positions?

I have manually backtested this system for Jan, Feb, Mar, Jun, Aug of this year with between 20 to 30 positions per month taken and an average of 900 pips profit a month. I don't know why the EA's arn't working....

Thanks for all the efforts and I hope we get this thing right!

 

Fibzy,

what pair did you test manually?

 

Hi adria,

I manually backtested GBP/USD.