Write Your First Super Simple MT5 Expert Advisor and Learn MQL5 Coding
Вставка
- Опубліковано 23 сер 2024
- *Complete MT5 Programming Course: en.bmtrading.d...
*Recommended Broker: en.bmtrading.d...
*Free Trading Journal: en.bmtrading.d...
**FTMO Funded Trading: trader.ftmo.co...
**myForexFunds Funded Trading: myforexfunds.c...
*These Links redirect to my webpage where you can find free or paid products and lots of useful information.
**These Links are Affiliate Links. If you use this link you can support the channel because I will receive a commission form the company. You do not have any disadvantages of course!
Learn about the benefits of automated trading. After programming trading strategies for a while I started teaching how to program expert advisors for the MT4 (MetaTrader 4) and MT5 (MetaTrader 5). Until now I only did videos in German but now I will start this channel with English videos to reach a larger audience of traders and help them improve their trading. There will be no fake trading on this channel and no lies. I show trading as it is - the good and the bad sides. Stay tuned and subscribe because you don't want to miss ;)
Instagram: / rene_balke
Trading in derivative products such as futures, options, CFDs, Forex and certificates involves a considerable risk. These products are not suitable for every investor. Investors could potentially lose all or more of the original investment. If anything, only money that equals personal risk capital and can be lost without jeopardizing financial security or lifestyle should be used. Partially or fully automated trading programs can only be used to support the trader. Past performance is not an indication of future results.
Source Code:
#include
int totalBars;
ulong posTicket;
CTrade trade;
int OnInit(){
totalBars = iBars(_Symbol,PERIOD_D1);
return(INIT_SUCCEEDED);
}
void OnTick(){
int bars = iBars(_Symbol,PERIOD_D1);
if(totalBars < bars){
Print("Total bars changed to ",bars);
trade.PositionClose(posTicket);
if(!PositionSelectByTicket(posTicket)){
double open = iOpen(_Symbol,PERIOD_D1,1);
double close = iClose(_Symbol,PERIOD_D1,1);
if(open < close){
Print("last d1 candle is green");
trade.Buy(0.1);
posTicket = trade.ResultOrder();
if(posTicket > 0) totalBars = bars;
}else if(open > close){
Print("last d1 candle is red");
trade.Sell(0.1);
posTicket = trade.ResultOrder();
if(posTicket > 0) totalBars = bars;
}
}
}
}
This is definitely my new favorite channel. I like that you start every video as if it was the first. It helps when someone stumbles upon your videos and they can start with any of them and not feel lost.
On the strategy tester backtest, there is a graph for "Profits and losses by hours" and it uses the times the trades are closed. Do you know if there's a way to compute this by the times the trade was opened? For example, so I could find what times are better or worse for my EA to take trades? Thanks for any insight and thank you for sharing your knowledge!
Thank you
@ Thank you!
Very Nice Explanation
Easy to understand
I will love to join your every video
great video, thank you! I'll be watching more
Did you have any video for rentable bot for mt5? And how to install it? Also did you have a video of a bot that use chat gpt strategy? Thanks. Best regards
Hi Rene, please make a video of how to create an EA that provides signals on a daily basis based on candlestick patterns and price movement
Thanks
Hey :) I made a series for candlestick patterns. You can find it here: ua-cam.com/video/CKz9DewM2Vg/v-deo.html
Thanks Rene, very informative and useful!
Good day @René Balke . I was trying to code the EA which trades any arrow indicator, I followed your video step by step but I'm getting errors. So it's not even compiling and your help will be appreciated. Kindly find the mql5 errors below...
'input' - unexpected token
'=' -unexpected token
'3' - some operator expected
'barsTotal' - undeclared identifier
'BufferSell' - undeclared identifier
Can you code an EA with a rectangular support/resistance or supply and demand or order block? That would be most interesting
thumbs up @renebalke your content is actually something I was looking for
Congratulations for the videos, I am learning a lot. One question, how can I close a position based on the signals of 3 indicators, but not necessarily signals given at the same time?
Great Video as always René
Good day Mr Rene... Do you have any idea on how we can trade big moves like the news
Where can find discussion on mql5 settings from a publisher...
Honestly, you are a wonderful person, but I do not know programming. Can you help me in situations of many consecutive losses?
Fantastic, my congratulations!!
Suuuuuper Du hast unterrichtet.
is mql4 same?!
very glad to see your video and channel.
Thanks!! :) Have a look at this to learn mql4: ua-cam.com/video/NbwMUccj3Wg/v-deo.html
There are some differences compared to mql5..
Informative video 👌 thanks for sharing 👍
Hi Rene how do we make the EA open a new trade only after the current trade has hit TP or STL
Already trying to make an ea with this strategy for over a month now 😃. I am also adding simple moving average to only buy/sell if closes above/below. Could you maybe help me with that?
Nice :) Just watch some other tutorials on this channel. I worked with the MA in many of them ;)
Guter Mann!
i have a question , how can one get buffer of MA based of rsi data or any indicator on mql5 , like iMAOnArray on mt4
Rene, I just checked your ftmo. What happened? Did you not set the daily drawdown limit to less than 1000 USD and was it still 4000 USD? I really sorry for what happened.
Challenge is lost.. But no worries it is fine. It is never guaranteed to win such a prop firm challenge. I think I will make a video (or a live) and make a little summary of the challenge in the next days :)
Hi Rene, best love your channel. I write in Mql4 but i am seeing some features in in mql5 i want to have. Can you advice what is the best reading material path to follow. e.g i am getting confused with the different classes to do trades. which one is the best one
I don't really know. I would always recommend to just watch tutorials and maybe read the mql5 documentation.
@ Do you use mql5 storage for version control. What do you use for version control
@@triniatlarge I don't use any version control because mql5 programs are usually really short and easy. Also I always work alone at programs so I don't really need it.
cool
Can I be your friend?...like for real.
Bro it will be hard if you do not live in my neighborhood :D But we can be UA-cam friends for sure
@ cool cool😁😁
I have idea for write ea then price break market structure use fibo fine retest price at lv 50,61.8 can you show some coding about fibo tool?
Where can i contact you please.
can you recommend a profitable EA for beginners?
No I am sorry but I cannot see the future (unfortunately :/)