Please help me to create an EA

 

I need help creating an EA that will in order

1) Calculate the difference between high and low of the last closed candle ( Range=Prev_CandleH - PrevCandleL)

2) Compare this value to a a variable

3) If the difference between high and low of the last closed candle is equal or greater than user assigned variable

4) Execute BUY STOP at LOW of prev candle and execute SELL STOP at LOW of prev candle

5) Close pending order if not filled in 4 hours

6) Take profit of 40 pips


I am a total novice so any advice would be appreciated and I am willing to share completed EA with anyone who can program this.

 
easycrom:

I need help creating an EA that will in order

1) Calculate the difference between high and low of the last closed candle ( Range=Prev_CandleH - PrevCandleL)

2) Compare this value to a a variable

3) If the difference between high and low of the last closed candle is equal or greater than user assigned variable

4) Execute BUY STOP at LOW of prev candle and execute SELL STOP at LOW of prev candle

5) Close pending order if not filled in 4 hours

6) Take profit of 40 pips


I am a total novice so any advice would be appreciated and I am willing to share completed EA with anyone who can program this.

Tell me if you have this already already done, otherwise I might help you.


Joao

 
NO I have not been able to get it to work, I could post the code if you want to care to have a look at it.
 

I'll take a look. Post it or send to abstract.mind@hotmal.com .

Joao

 

it is very simple

are you sure this rules are profitable?

 

I've done this strategy. There seems to be 2 problems:

- check condition 4 about buystop (isn't it at HIGH?)

- no instructions are given about orderClose or stopLosses (as consequence, an unprofitable order remains open till end of tests)

Files:
easycrom.mq4  3 kb
 
My apologies for posting such a lengthy code explanation and thanks to ABSTRACT MIND. MY only other question is where would i insert the magic number so that I can use it on different currencies
Files:
ranger.mq4  3 kb
 
I read the articles and I think I found out where the magic number should go. ABSTRACT MIND thank you very much for your help. If you promise not to include my name as a co-inventor and if we have the money LOL lets sell this sucker online! Yes I concede that since there is no stop loss or order close that the EA is vulnerable but lets say you experience a margin call on your initial deposit after extracting 3 times your original deposit using this EA would that be such a bad thing?
 
Nope I still do not know how to attach it to other currencies but I will keep trying
 

Here is an upgrade, with orders count and possibility for several currencies. Let me tell you something; you are going to test it`with eurusd 1hour, but don't believe the results. Because you defined take profit as 40 points and you are using 1 hour chart, the results are based on a price behaviour that doesn't correspond history (take profits due to currency impossible moves). After test, open the chart with results and switch to a smaller timeframe. You will see that many take profits should not have been triggered.

So, i strongly recommend that you firstly make a forward test in a demo account. Don't start with real money.

Nevertheless, with these things we can always be wrong. If you succeed improving this EA and get a million selling or using it yourself, you just give me one percent. is it ok?

Have nice trading.

Files:
ranger_v2.mq4  5 kb
 

1) I run it on the 4 hour time frame not the one hour and if I did I would modify it to have the orders expire in one hour. On this time frame in each case I saw a double of my accounting prior to close

2) I will say it here ABSTRACT IF THIS THING WORKS WE WILL EITHER

A) Start a website where I right the copy and WE SPLIT THE SALES 50/50

B) AFTER I BECOME A MILLIONAIRE I WILL CERTAINLY GIVE YOU 5% OF MY FIRST MILLION USD HEHE


Finally ABSTRACT I am going to demo test the hell out this and you should have gotten an email from me, because if this bad boy works you and I are going to have to see how we can protect it lol. Thank you very much for your work and I will stay in touch.

Reason: