• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 7:13pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 7:13pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

MT4 build 1220 EA running OK, build 1260 not OK 1 reply

Why your broker is your friend and your enemy 4 replies

MT4 Compiler Build prior to Build 6xxx 7 replies

Making your Indicators work with MT4 Build 600+; Simple! 1 reply

Build 201 has new function names that can mess up your EA 0 replies

  • Commercial Content
  • /
  • Reply to Thread
  • Subscribe
  • 27
Attachments: How to Build your EA
Exit Attachments
Tags: How to Build your EA
Cancel

How to Build your EA

  • Last Post
  •  
  • 1 567Page 89 10
  • 1 7Page 89 10
  •  
  • Post #141
  • Quote
  • Mar 28, 2019 10:56pm Mar 28, 2019 10:56pm
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Quoting Arturke
Disliked
Hi D.s, was thinking create own system. It actually should be very useful, because don't want to sit in front of computer all day staring to monitor and trading anymore but the system can't go around release fresh news. Thinking that it could don't trade before few hours and after few hours release news but if already in the market some trade it should dynamically recognise don't trade and even after news or something like that, like finger print or what so ever without SL. Maybe, it is already some engine that special create for news trading or...
Ignored
Sorry bro. I don't have any news related trading system. I personally prefer to stay out of news as there is no logic to the price movement during big news events.
 
 
  • Post #142
  • Quote
  • Edited 11:34am Apr 2, 2019 11:20am | Edited 11:34am
  •  Arturke
  • Joined Dec 2011 | Status: Member | 554 Posts
Quoting D.s
Disliked
{quote} Sorry bro. I don't have any news related trading system. I personally prefer to stay out of news as there is no logic to the price movement during big news events.
Ignored
Agree with you per news its better stay away from the market. Thank you anyway. Maybe, have any ideas how to code that ea for example take notice lets say from forexfactory.com about news and stop trading or shout down trading session and after awhile, again start to trade after 1hours? Im guessing that to recognise unplanned news its sounds like depends on high momentum. Your thoughts?
 
 
  • Post #143
  • Quote
  • Apr 2, 2019 11:43pm Apr 2, 2019 11:43pm
  •  satish37
  • Joined May 2013 | Status: Member | 1,455 Posts
Any thing which can lock profit at certain pips and rest running and close trade at certain pips loss
Neither a Bro Nor a Pro I am I
 
 
  • Post #144
  • Quote
  • Apr 5, 2019 12:24am Apr 5, 2019 12:24am
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Quoting Arturke
Disliked
{quote} Agree with you per news its better stay away from the market. Thank you anyway. Maybe, have any ideas how to code that ea for example take notice lets say from forexfactory.com about news and stop trading or shout down trading session and after awhile, again start to trade after 1hours? Im guessing that to recognise unplanned news its sounds like depends on high momentum. Your thoughts?
Ignored
reading data from a different website other than your broker server is difficult to code using MT4. I still have never tried to read anything from any particular website. to read from web page, you need a good quality parser to recognize required information from the web page. The website owner will never allow you to directly access their servers database to read the data unless you are in a partnership with that website and doing business together.

So clearly speaking, Its not possible. May b you can manually go to the website daily and copy the required data and store it in a text file and your EA will read from it whole day and work accordingly and then next day you need to again replace the text file content for that day.
 
 
  • Post #145
  • Quote
  • Apr 5, 2019 12:38am Apr 5, 2019 12:38am
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Quoting satish37
Disliked
Any thing which can lock profit at certain pips and rest running and close trade at certain pips loss
Ignored
yes it is possible. I don't have it with me. But its easy to create it. So try creating it.


For example in my code template file you can find this code

void Breakeven()
{
total = OrdersTotal();
double ns=0;
for( i=total-1;i>=0;i--)
{
if(!OrderSelect(i, SELECT_BY_POS)) continue;
if(OrderMagicNumber() != Magic || OrderSymbol() != Symbol()) continue;
if(OrderType() == OP_BUY)
ns = PipsAdd(OrderOpenPrice(),Spread,1);
else if(OrderType() == OP_SELL)
ns = PipsAdd(OrderOpenPrice(),Spread,2);
if(OrderStopLoss() !=ns && !OrderModify(OrderTicket(),OrderOpenPrice(),ns,OrderTakeProfit(),0,Blue))
{
printf("error modifying stop loss"+ ns);
break;
}
}
}

In this code "ns" is the price where the trade has originated. As this is for break even. So the stoploss is modified to "ns" price when this function is called.
If u need to add more for profit just add it to "ns" , so that stoploss will be moved to more profitable place. just make sure price has crossed that point else you will get the mentioned error message.
 
 
  • Post #146
  • Quote
  • May 22, 2019 12:53am May 22, 2019 12:53am
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Marshalmax .. i can only send one mail per 24 hour. So this is the reply

What i understood that, the stoploss is taking more pips then you originally intent it to take( box range + spread ). If i am wrong just correct me.
Assuming what i understood is correct then you want to put your stoploss without the spread amount. This calculation cannot be directly done using Ea builder. You need to modify the code manually.
Just before the open trade function is used, you need to find the spread using symbolinfointeger function
Spread[COLOR=rgba(0, 0, 0, 0.87)]=SymbolInfoInteger(Symbol(),SYMBOL_SPREAD);[/color]
[COLOR=rgba(0, 0, 0, 0.87)]Then convert the spread amount to decimal according to the opened currency pair.[/color]
[COLOR=rgba(0, 0, 0, 0.87)]Then finally add or subtract it with the stoploss price for long or sort accordingly.[/color]
[COLOR=rgba(0, 0, 0, 0.87)]This will bring the stoploss to your desired position.[/color]
[COLOR=rgba(0, 0, 0, 0.87)]Then open the trade.[/color]
[COLOR=rgba(0, 0, 0, 0.87)]Else[/color]
[COLOR=rgba(0, 0, 0, 0.87)]If you want to modify the take profit only without disturbing the current stoploss , then after finding the spread, multiply it to 3 times and then convert it into decimal and add or subtract to the current take profit price for long or short respectively. This will increase your profit target and then open the trade.[/color]

[COLOR=rgba(0, 0, 0, 0.87)]if the trade is already opened, then just use trade modify function and do the above changes.[/color]

[COLOR=rgba(0, 0, 0, 0.87)]Every changes is needed to be done manually. Ea builder do not have this level of complexity.[/color]

[COLOR=rgba(0, 0, 0, 0.87)]I hope this helps. Let me know if you do not understand any part.[/color]
 
 
  • Post #147
  • Quote
  • Jun 28, 2019 4:35am Jun 28, 2019 4:35am
  •  lycheebeng
  • | Joined Jun 2019 | Status: Junior Member | 1 Post
Hey D.s, very thank you for this forum and the code template. I have purchased the EA Builder and found it very very useful and worth each penny spent! I have tried the basics and I am good with it but i have some troubles when comes to building EA using custom indicator. Do you have any platform or suggestions i can refer to? Thanks!
 
 
  • Post #148
  • Quote
  • Jul 27, 2019 11:14pm Jul 27, 2019 11:14pm
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Sorry for not able t reply in this thread in time and this delay will still continue. I have a very busy working schedule as I am working on creating an Machine Learning Trading AI... So unless you have some knowledge about reinforcement learning, which may help me to finish this project, I could not interact about anything else. As i said earlier, learning about machine learning and implementing it on MT4 is taking a lot of my time.
Thanks for understanding.

Ds.
 
 
  • Post #149
  • Quote
  • Jan 30, 2020 6:24pm Jan 30, 2020 6:24pm
  •  akamrp
  • | Joined Dec 2019 | Status: Member | 222 Posts
Hi, Has anyone used any of the tools for creating a EA? if so, which one do you guys recommend?
 
 
  • Post #150
  • Quote
  • Jan 31, 2020 2:36am Jan 31, 2020 2:36am
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Quoting akamrp
Disliked
Hi, Has anyone used any of the tools for creating a EA? if so, which one do you guys recommend?
Ignored
I have used 4 different tools to build EA. among them easiest one is the ea builder. I think the first post in this thread has all the links.
 
 
  • Post #151
  • Quote
  • Jan 31, 2020 5:56am Jan 31, 2020 5:56am
  •  akamrp
  • | Joined Dec 2019 | Status: Member | 222 Posts
Quoting D.s
Disliked
{quote} I have used 4 different tools to build EA. among them easiest one is the ea builder. I think the first post in this thread has all the links.
Ignored
Thanks, I was looking at EAbuilder last night, I have not paid for it yet so couldn't get the source code. It doesn't have one of the indicators I am using, is this down to the site itself or can I add in indicators too?

Also, is it possible to add in a time parameter e.g. as I am testing a 1h strategy, what if I only want trades between 9.00 and 18.00?

I will also have a look at the other tools later today.
 
 
  • Post #152
  • Quote
  • Jan 31, 2020 1:21pm Jan 31, 2020 1:21pm
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Quoting akamrp
Disliked
{quote} Thanks, I was looking at EAbuilder last night, I have not paid for it yet so couldn't get the source code. It doesn't have one of the indicators I am using, is this down to the site itself or can I add in indicators too? Also, is it possible to add in a time parameter e.g. as I am testing a 1h strategy, what if I only want trades between 9.00 and 18.00? I will also have a look at the other tools later today.
Ignored
In the unpaid version you can download the code as an indicator. And you cannot add indicators of your own. You have to use the indicators provided by them. Custom timing is also not possible . U have to modify the code yourself for custom time.
 
 
  • Post #153
  • Quote
  • Apr 2, 2020 8:35am Apr 2, 2020 8:35am
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
HIGH PRIORITY INFO:

The world economy is slowing down and getting lots of spike. So any low grade automated EA will kill your account.
I hope before creating any automated trading EA you do a proper testing. Both backtest and current scenario test. MT4 back test is not sufficient.

All testing and EA creating tools i know about are mentioned at the beginning.
 
 
  • Post #154
  • Quote
  • Jun 5, 2020 10:21am Jun 5, 2020 10:21am
  •  crystalsinha
  • | Joined Jun 2020 | Status: Junior Member | 1 Post
hi i am looking for an Expert Advisor in Forex Trading for MT4, Though i have a bit experience in Forex Trading but i need an Expert Advisor (EA) for automatic trading. i would really appreciate if someone wants to increase their knowledge and experience by building me a Forex EA free of cost.
Here is what i need, I would really appreciate anyone who reaches me out.
2MA + RSI
1: RSI is <30 fast MA crosses above the slow MA for sell
2: RSI is >70 fast MA crosses below the slow MA
3: RSI and MA are adjustable
4: TP, SL and BE,TS needed
5: When buy trade is active, after that fast MA crosses below slow MA, then TP changes to BE or close the trade if trade is in profit and vice versa for sell trade
Please help me if you can, I would really appreciate.
 
 
  • Post #155
  • Quote
  • Jun 9, 2020 7:19am Jun 9, 2020 7:19am
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Hi Guys... Rather than asking me private messages regarding Ea building tips, please post it directly on this thread. For my account, I can write only one message per 24 hour , so its difficult to have multiple conversation. And others traders could also benefit from it if it is posted in the thread directly.

Regarding your question as "How to code an EA easily, which follow 2 time frame rule and movement in higher time frame determines the trading direction for intra day (purely price action) ?"

I guess in your question purely price action means without the use of any indicators, you need to find the trading direction.
Thee fact that you want an intra day strategy to code means you are interested to trade with 5 minutes to 1 hour time frames.

My Coding logic:
1. Take 1 Day time frame only as your higher time frame.
2. Analyse previous two day candle only.
3. If yesterday candle broke above or bellow day before yesterday's high or low, then for today your direction is only buy or sell respectively.
4. if yesterdays candle closes inside its previous day candle, then shift the reading by one candle to the left and reapply the process with two candles only to get the old direction which may continues. And keep in mind the probability of a good trade is low today, as price was not able to break and close outside currently.

This is a tested strategy for finding the direction with high accuracy. I have built it without coding, using the tools I have mentioned in the first page. So Just look at the chart manually and see if it suits you method after that design it.
 
 
  • Post #156
  • Quote
  • Jun 22, 2020 2:38pm Jun 22, 2020 2:38pm
  •  ChristianOst
  • | Joined Jun 2020 | Status: Junior Member | 1 Post
Hello D.S.

firstly thank you for your effort trying to teach mql4 and ea building in this thread, secondly i have a question about the ea builder. Once i get the paid version of the software will i be able to make an ea with custom indicators or only the ones provided in the software, i would appreaciate the anwser since i only trade with custom indicators.
 
 
  • Post #157
  • Quote
  • Jun 23, 2020 1:16pm Jun 23, 2020 1:16pm
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Quoting ChristianOst
Disliked
Hello D.S. firstly thank you for your effort trying to teach mql4 and ea building in this thread, secondly i have a question about the ea builder. Once i get the paid version of the software will i be able to make an ea with custom indicators or only the ones provided in the software, i would appreaciate the anwser since i only trade with custom indicators.
Ignored
custom indicators directly cannot be used even in the paid version. But if the logic behind the custom indicators can be achieved using the combination of the provided indicators, then you can create your EA using that logic.
 
 
  • Post #158
  • Quote
  • Aug 2, 2020 5:14pm Aug 2, 2020 5:14pm
  •  sibianaga
  • | Joined Jul 2020 | Status: Member | 17 Posts
Hello D.s,
In the EA builder is there a way of getting a buy or sell to be delayed from order open that takes place on the first tick of new bar at the open.
I want the order to open at low of the next bar and not the open.
Icustom signal is taken from an indicator buffer that calculates the price of the candle LOW as a signal to BUY. or opposite for SELL
Appreciate your help.
 
 
  • Post #159
  • Quote
  • Aug 3, 2020 11:37am Aug 3, 2020 11:37am
  •  lkhotforex
  • | Commercial Member | Joined Dec 2015 | 1 Post
Quoting D.s
Disliked
{quote} custom indicators directly cannot be used even in the paid version. But if the logic behind the custom indicators can be achieved using the combination of the provided indicators, then you can create your EA using that logic.
Ignored
Hello DS- can you create an EA for me related to currency correlation
 
 
  • Post #160
  • Quote
  • Aug 3, 2020 12:57pm Aug 3, 2020 12:57pm
  •  D.s
  • | Commercial Member | Joined Jul 2016 | 252 Posts
Quoting lkhotforex
Disliked
{quote} Hello DS- can you create an EA for me related to currency correlation
Ignored
I can help you with your doubts while you create the EA yourself. If you expect me to do everything for you, then I am sorry.
 
 
  • Commercial Content
  • /
  • How to Build your EA
  • Reply to Thread
    • 1 567Page 89 10
    • 1 7Page 89 10
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023