Help needed to write an EA program.

 

Hello I am new to this programming thing and I do not know anything. I know how to trade but not how to program.

I would like help in writing an EA for this system:

- Use the 15 minute chart for the currency of your choice.

- Find the High and Low for the 8:30 - 9:00 (EST) time frame

- Then buy if price goes 4 pips above the high OR sell if price goes 4 pips below the low

- Do only one trade.

- Do not buy and sell ( either Buy or sell but not both).

- Buy or Sell whichever comes first.

- Do not trade if one of the bars in the specified time frame ( 8:30- 9:00) is over 50 pips.

- Manually adjusting the Stop Loss, Trailing stop and Profit limit.

Thanks,

Mico

 

Hello mico,

For how long do you have to test this method? which results? Could you attach explanatory images?

I think that 2 posts are not sufficient to require a ea directly.

Constitute a better file so that it is to validate by the other members and there I think that they will make your EA.

 

Hello mico,

An EA should not be difficult for this system, BrunoFx is right we would need more information.

So far I understand all this:

- Use the 15 minute chart for the currency of your choice.

- Find the High and Low for the 8:30 - 9:00 (EST) time frame

- Then buy if price goes 4 pips above the high OR sell if price goes 4 pips below the low

- Do only one trade.

- Do not buy and sell ( either Buy or sell but not both).

- Buy or Sell whichever comes first.

- Do not trade if one of the bars in the specified time frame ( 8:30- 9:00) is over 50 pips.

So I pressume that you only buy or sell once a day, or you dont if it does not trigger the signal.

My question is:

- Manually adjusting the Stop Loss, Trailing stop and Profit limit.

This is the most important part, when opening an order (buying or selling), we need to set a Take profit at least or this cannot be backtested ?

I would suggest to indicate a rule for stop loss and take profit, then it can be done

Thanks

S.

 

where can a newbie get a guidebook?

Guys,

I dont know what an expert advisor does and know no programming. How do I get a manual somewhere to learn all this stuff? Id also like the above poster make a few simple trading systems but if someone did it for me and gave me the code, where di I insert it? (ok, no wise cracks! lol) I am lost here. At least tradstation gives one plenty of tutorials and free seminars. Where do I get educated on metatrader anywhere????? HELP!!!!

thanx,

marc

 
Pakua42:
Guys,

I dont know what an expert advisor does and know no programming. How do I get a manual somewhere to learn all this stuff? Id also like the above poster make a few simple trading systems but if someone did it for me and gave me the code, where di I insert it? (ok, no wise cracks! lol) I am lost here. At least tradstation gives one plenty of tutorials and free seminars. Where do I get educated on metatrader anywhere????? HELP!!!!

thanx,

marc

You may read Codersguru lessons https://www.mql5.com/en/forum

Change "Display Options" in the end of the page to "From The Beginning" and you will see all the lessons. Start from the first one. You do not need to learn and remember anything. Just read. And after that you will understand something.

Then you may start to read some book in the "Documentation" section. This one or anyone.

After that you will try to trade on demo account. We have many threads (old ones and new ones) where the people are trading with the explanation.

Besides, you may visit the other threads where the people explaining how to use some classical indicators or classical systems (support and resistance, Ichimoku, divergence etc).

After that you will have one good question: why all the theory does not work in practics? As nobody will answer you to this question (nobody knows) you will try to construct your first trading system.

Then you will repeat everything once again: lessons, reading, trading, an other main question ("why some people are trading this system but I can not", or "How I distinguish real trading system from unreal", or "How I distinguish good tradable EAs from EAs adjusted especially to have good backtesting results only", and so on).

You will do it all the time from the beginning.

 

You talked about EAs that are not 'good'... rather, they are only adjusted to backtest well... is this a common problem? I am writing a lengthy EA now and was planning on using the backtesting as a way to refine the numeric parameters of my system... will this be a problem? what are some of the potential drawbacks of this approach?

 
RJames5541:
You talked about EAs that are not 'good'... rather, they are only adjusted to backtest well... is this a common problem? I am writing a lengthy EA now and was planning on using the backtesting as a way to refine the numeric parameters of my system... will this be a problem? what are some of the potential drawbacks of this approach?

Backtesting is ok. But some people who are selling EAs are adjusting EAs especially for good backtesting and it is nothing with trading systems or any. If trading system (manual trading system) may be profitable or profitable already so backtesting will help to find the good settings. If nobody tested trading system without EA and we created EA without it (without testing the system manually) so we may find good settings by backtesting but sometimes the market may broke any settings and we will speak about the following: "the market lost correlation between the price the system/indicators/EA" or "this EA is working in particular market condition ...". But in reality it is that system was not tested/improved enough to create EA and sometimes the programmers are not the reason of bad EA performing because it is subject to manual trading system testing/improving.

Any system should be proved manually.

 

EA if coded with the understanding of technical analysis may give some good return but not everytime work. This is due to the market changes with many environmental factors than ideal condition. Hence if somone can merge the fundatmental and technical factors in EA ( sound like AI process ), then the chances of great profit earning is huge.

 
newdigital:
After that you will have one good question: why all the theory does not work in practics? As nobody will answer you to this question (nobody knows) you will try to construct your first trading system.

That sentence gave me a really good laugh. So true!

 
mico:
Hello I am new to this programming thing and I do not know anything. I know how to trade but not how to program.

I would like help in writing an EA for this system:

- Use the 15 minute chart for the currency of your choice.

- Find the High and Low for the 8:30 - 9:00 (EST) time frame

- Then buy if price goes 4 pips above the high OR sell if price goes 4 pips below the low

- Do only one trade.

- Do not buy and sell ( either Buy or sell but not both).

- Buy or Sell whichever comes first.

- Do not trade if one of the bars in the specified time frame ( 8:30- 9:00) is over 50 pips.

- Manually adjusting the Stop Loss, Trailing stop and Profit limit.

Thanks,

Mico

try EA

use BUYSTOP and SELLSTOP but if ASK and BID - HIGH and LOW < 5 PIPS = direct BUY and SELL ORDER Parameters:

OffSetHour = 6//Displacement of hours : default ALPARI BROKER TIME 6 HoursHourOpenPos = 9;//09:00 EST from 9 o'clockHourDeletePos = 23//Close pending Orders 23:00 ESTHourClosePos = 23//Close BUY and SELL Orders 23:00 EST

regards

Alex

Files:
Reason: