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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Automated or semi automated trading? 3 replies

Its better learn wisdom late, than never to learn it at all 8 replies

I want to learn and learn 18 replies

I want to learn the MQL4 3 replies

want to learn about filling the gap on Sunday open... 2 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe

Want to learn how to code an automated PA trading bot

  • Post #1
  • Quote
  • First Post: Aug 13, 2018 7:48am Aug 13, 2018 7:48am
  •  Initial-M
  • | Joined Nov 2017 | Status: Mostly Dionysian... | 14 Posts
Hello! After testing and taking it live, i have finalized my trading principal.

I wish now to construct a bot of function. My question is:
What would be the best approach, in learning how to write an automated trading bot? Which coding language would be suited?

- My current vision is the possibility to get a bot with full execution[principal by which it reads price, entries, stops, tp's, lot size] going for mt4.
- I don't have coding knowledge.
- Time is not an issue.

Thank you for stopping by! Regards, Initial-M
  • Post #2
  • Quote
  • Aug 13, 2018 1:36pm Aug 13, 2018 1:36pm
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting Initial-M
Disliked
Hello! After testing and taking it live, i have finalized my trading principal. I wish now to construct a bot of function. My question is: What would be the best approach, in learning how to write an automated trading bot? Which coding language would be suited? - My current vision is the possibility to get a bot with full execution[principal by which it reads price, entries, stops, tp's, lot size] going for mt4. - I don't have coding knowledge. - Time is not an issue. Thank you for stopping by! Regards, Initial-M
Ignored
The first step is to understand programming fundamentals. Since you are going for MT4 then you'll want to complete a C++ tutorial, and by the end of it you should have a good understanding of variables, functions, and OOP. There are a lot of MQL tutorials out there, but most of them are outdated and/or teach some pretty bad coding habits.

Also, it's not important for you to learn the C++ standard library because you will be using the MQL standard library. Once you have a grasp of the language you can begin to dive into some MQL programs, and I'd recommend learning MQL5 if your broker offers that as an option.


Here are some really good references to begin.

http://www.learncpp.com/
https://www.sololearn.com/Course/CPlusPlus/
1
  • Post #3
  • Quote
  • Edited at 4:13pm Aug 13, 2018 4:02pm | Edited at 4:13pm
  •  Initial-M
  • | Joined Nov 2017 | Status: Mostly Dionysian... | 14 Posts
Quoting Nicholishen
Disliked
{quote} The first step is to understand programming fundamentals. Since you are going for MT4 then you'll want to complete a C++ tutorial, and by the end of it you should have a good understanding of variables, functions, and OOP. There are a lot of MQL tutorials out there, but most of them are outdated and/or teach some pretty bad coding habits. Also, it's not important for you to learn the C++ standard library because you will be using the MQL standard library. Once you have a grasp of the language you can begin to dive into some MQL programs,...
Ignored
Thank you for stopping by! Topic/question: Possibility of assigning an element displayed on chart's properties by using using more than one past chart element property?

After reading your post, i found an article on wikipedia. There, I came across the term multiple inheritance.
Could you elaborate what "multiple inheritance" means?

From how i understood it, MI, if existent for mql4/5 would be: A defined element s properties can be defined by using more than one defined element from the chart past?

Is my understanding of the term correct? If so, is there a way how one can apply MI type language structure without using MI?

___________________

Thank you for the time!
  • Post #4
  • Quote
  • Aug 13, 2018 4:36pm Aug 13, 2018 4:36pm
  •  Nicholishen
  • Joined Jul 2005 | Status: zzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzz | 1,289 Posts
Quoting Initial-M
Disliked
{quote} Thank you for stopping by! Topic/question: Possibility of assigning an element displayed on chart's properties by using using more than one past chart element property? After reading your post, i found an article on wikipedia. There, I came across the term multiple inheritance. Could you elaborate what "multiple inheritance" means? From how i understood it, MI, if existent for mql4/5 would be: A defined element s properties can be defined by using more than one defined element from the chart past? Is my understanding of the term correct?...
Ignored
MQL4/5 is a single inheritance language and multiple inheritance is not possible.
  • Post #5
  • Quote
  • Aug 13, 2018 4:41pm Aug 13, 2018 4:41pm
  •  Initial-M
  • | Joined Nov 2017 | Status: Mostly Dionysian... | 14 Posts
Quoting Nicholishen
Disliked
{quote} MQL4/5 is a single inheritance language and multiple inheritance is not possible.
Ignored
Meaning, my understanding of multi inheritance was correct? If so, would you be of the knowledge, of a trading platform having the possibility of applying MI code?
  • Post #6
  • Quote
  • Aug 13, 2018 9:08pm Aug 13, 2018 9:08pm
  •  algochaser
  • | Joined Aug 2018 | Status: Member | 3 Posts
Nearly all retail trading platforms do not support MI - IMO the scripting languages for these platforms are pretty basic - mostly basic C++ or C#.

If you really need to use MI then it could be possible to wrap up that functionality in a external DLL to use in mt4/5 (citation needed?) though this might depend on what you're implementing. Keeping your EA simple will make it much easier to optimise and test in future.
1
  • Post #7
  • Quote
  • Aug 13, 2018 9:52pm Aug 13, 2018 9:52pm
  •  240z
  • | Joined Oct 2012 | Status: Member | 51 Posts
we learned by going to mql4.com site and looking at the Code Base where E.A's are already written. your best friend is Cut and Paste. much easier to start with a simple Indicator and work your way up to an EA. took us about six months but can code my ideas now. nice feeling to have an idea and be able to have it come to life on the charts. good luck
  • Post #8
  • Quote
  • Aug 14, 2018 4:49am Aug 14, 2018 4:49am
  •  Initial-M
  • | Joined Nov 2017 | Status: Mostly Dionysian... | 14 Posts
For self reference on implementing MI via an external source:

https://docs.mql4.com/basis/preprosessor/import
  • Post #9
  • Quote
  • Aug 14, 2018 4:51am Aug 14, 2018 4:51am
  •  Initial-M
  • | Joined Nov 2017 | Status: Mostly Dionysian... | 14 Posts
Quoting algochaser
Disliked
Nearly all retail trading platforms do not support MI - IMO the scripting languages for these platforms are pretty basic - mostly basic C++ or C#. If you really need to use MI then it could be possible to wrap up that functionality in a external DLL to use in mt4/5 (citation needed?) though this might depend on what you're implementing. Keeping your EA simple will make it much easier to optimise and test in future.
Ignored
Exquisite class information, thank you!
  • Post #10
  • Quote
  • Aug 14, 2018 4:54am Aug 14, 2018 4:54am
  •  Initial-M
  • | Joined Nov 2017 | Status: Mostly Dionysian... | 14 Posts
Quoting 240z
Disliked
we learned by going to mql4.com site and looking at the Code Base where E.A's are already written. your best friend is Cut and Paste. much easier to start with a simple Indicator and work your way up to an EA. took us about six months but can code my ideas now. nice feeling to have an idea and be able to have it come to life on the charts. good luck
Ignored
Looking forward to it also. Thank you!
  • Post #11
  • Quote
  • Aug 14, 2018 8:55am Aug 14, 2018 8:55am
  •  Mourad
  • | Joined Sep 2013 | Status: Member | 42 Posts
My journey with coding was difficult also because I don't have any coding background. I tried the mql reference, and many articles and videos over the internet, but was difficult for me.
Then came a friend of mine, who is a professional coder, he coded a simple EA for me with most of common features, and explained to me what each function does, I kept going over every function till I understood how it works.
So mainly, you should read the basics of mql coding in mql official reference, and then get yourself a simple EA that you know exactly what it does, and start studying it's coding lines and functions.
Then try to manipulate these functions yourself and monitor what your manipulations do to the trading logic..
There's also good free youtube videos for jimdandy.. might help you.
1
  • Post #12
  • Quote
  • Last Post: Aug 14, 2018 1:40pm Aug 14, 2018 1:40pm
  •  rockit
  • Joined Oct 2013 | Status: Member | 819 Posts
Quoting Initial-M
Disliked
Is my understanding of the term correct?
Ignored
Unlikely, for you know not how to code, and do not understand this feature, you cannot possibly be in need of such a feature.
What the feature means is also explained on Wikipedia: It is a feature of some OOP (comp.) languages, where an object or class can inherit features of more than one object or class. An OOP feature! Therefore nothing that should be of concern (to you) right now.
You otoh are probably concerned about how to combine several data-points of price/bar history.
..
  • Platform Tech
  • /
  • Want to learn how to code an automated PA trading bot
  • Reply to Thread
0 traders viewing now
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 / ©2021