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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Learning to write code for autotrading in MT4 7 replies

seeking someone to write robot program 2 replies

VTTrader: How to Write Your Own VT Indicator Introduction. 0 replies

How to write strategy to an API? 5 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 1
Attachments: How to write/program EA?
Exit Attachments

How to write/program EA?

  • Post #1
  • Quote
  • First Post: Mar 3, 2009 8:03am Mar 3, 2009 8:03am
  •  witkot
  • | Joined Jul 2007 | Status: Member | 8 Posts
Hi, guys,
How can I start with an EA that works under MT4?
Are there any guides to MT4 programming? What language is needed anyway, is it Visual Basic?
Where can I find them?
Any answer , even saying " read the forum" will be much appreciated

Thanks

Witkot
  • Post #2
  • Quote
  • Mar 3, 2009 8:52am Mar 3, 2009 8:52am
  •  Ronyn76
  • | Joined Oct 2006 | Status: Lord Of The Pips? | 227 Posts
Here is some information regarding mql4 in general: http://docs.mql4.com/
With this Wizard you can create/learn how to create simple EA's: http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/

hope this helps
Liberate me ex inferis
 
 
  • Post #3
  • Quote
  • Mar 4, 2009 12:02am Mar 4, 2009 12:02am
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,081 Posts
Witkot, the links posted by Ronyn are good. There's also other material at the mql4.com site that's helpful, e.g. click on the 'Book' link for an MQL4 primer, and also use the search facility to find answers to questions on specific topics (usually in the 'Articles' or 'Forum').

The language used is more like "C" (the predecessor of C++) than Visual Basic, but with a raft of MT4 chart/indicator/order placement commands thrown in. As long as you have a basic understanding of variables, arrays, loops, if....then.....else, procedures, functions, etc, it's not too difficult to learn.
 
 
  • Post #4
  • Quote
  • Mar 4, 2009 3:46am Mar 4, 2009 3:46am
  •  witkot
  • | Joined Jul 2007 | Status: Member | 8 Posts
Thanks a lot, guys.
 
 
  • Post #5
  • Quote
  • Aug 16, 2014 8:46am Aug 16, 2014 8:46am
  •  Rodggie
  • | Joined Aug 2014 | Status: Junior Member | 2 Posts
Quoting hanover
Disliked
Witkot, the links posted by Ronyn are good. There's also other material at the mql4.com site that's helpful, e.g. click on the 'Book' link for an MQL4 primer, and also use the search facility to find answers to questions on specific topics (usually in the 'Articles' or 'Forum'). The language used is more like "C" (the predecessor of C++) than Visual Basic, but with a raft of MT4 chart/indicator/order placement commands thrown in. As long as you have a basic understanding of variables, arrays, loops, if....then.....else, procedures, functions, etc,...
Ignored
Hello ! forgive my poor programming skills. I have a strategy where I need the EA to open buy stop and sell stop pending orders immediately. When one pending order is triggered, I will need the EA to open another pending order. all pending orders are to be opened at a specified points. when take profit is hit, I would like the EA to close all orders and start again immediately. How do I put this in the script provided and how do I incorporate the script to mt4? I do not use indicators and so they are to be ignored. I will really appreciate your help.
 
 
  • Post #6
  • Quote
  • Aug 17, 2014 6:11am Aug 17, 2014 6:11am
  •  fxdaytrader_
  • Joined Jan 2011 | Status: UberTroll | 1,847 Posts
Quoting witkot
Disliked
Are there any guides to MT4 programming? What language is needed anyway, is it Visual Basic? Where can I find them? Any answer , even saying " read the forum" will be much appreciated Thanks Witkot
Ignored
pls. have a look at http://www.forexfactory.com/showthread.php?t=485460
PM me with coding requests and I'll probably put you on my ignore list
 
 
  • Post #7
  • Quote
  • Aug 18, 2014 4:35am Aug 18, 2014 4:35am
  •  cjds18
  • | Joined Aug 2013 | Status: Member | 1 Post
Hi everyone,

I'm having trouble with a .mq4 indicator I'm programming. I've basically been successful in defining some support and resistance lines based on standard pivot points and can display this on the chart etc, I'm really happy with where the indicator is drawing these level lines.

One thing I'm having difficulty with which I think should be really basic is 'exporting' these price levels as Output Data (price) via a Buffer such as FextMapBuffer 's. When I know I'm successful then it will obviously display the values in the Control+D window.

Without me uploading the entire code can someone please point me in the direction of a help file or tutorial on this? I actually can't believe how difficult its been trying to do this! I'm defining a double for the buffers, SetIndexBuffer(0,FextMapBuffer1); then attempting to use the same formulas I've used to successfully create the DrawLine's to assign the value for the buffers. There's clearly some small piece of code I'm missing OR I'm going about it in totally the wrong way, I'm using various other indicators which display similar Output price data in their code and still can't seem to crack it.

The goal here is for the indicator to communicate with an EA I'm writing so that it can see these levels and use them within the rules for each strategy such as two closes above a resistance level in an uptrend etc.

many thanks guys!
Chris
 
 
  • Post #8
  • Quote
  • Aug 18, 2014 5:42am Aug 18, 2014 5:42am
  •  Gumrai
  • Joined Oct 2012 | Status: Member | 1,959 Posts
Quoting cjds18
Disliked
Hi everyone, I'm having trouble with a .mq4 indicator I'm programming..........
Ignored
It's not clear from your post, how you are drawing your lines.
Are you using trendlines/horizontal lines ? If so, you should be able to get the values with ObjectGetValueByShift
or
ObjectGetValueByTime
Please Do Not PM Me With Coding Enquiries
 
 
  • Post #9
  • Quote
  • Last Post: Sep 22, 2017 6:47am Sep 22, 2017 6:47am
  •  MarketWezard
  • | Joined Jun 2017 | Status: Member | 27 Posts
Im trying to call in this custome indecator ! anyone cold help ?
Attached File
File Type: mq4 SS_SupportResistance_v07.53 (filter alerts MA).mq4   49 KB | 95 downloads
 
 
  • Platform Tech
  • /
  • How to write/program EA?
  • Reply to Thread
0 traders viewing now
Top of Page
Forex Factory Blog Updated: Alerting All Members
  • 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 / ©2022