Activity
Mon
Wed
Fri
Sun
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
What is this?
Less
More

Owned by René

Automated Traders Community

Public • 336 • Free

Let's collaborate to become better traders/programmers! No spamming, no scamming! Be kind to each other!

Automated Traders Elite

Private • 71 • $49/m

Welcome to the Automated Traders Elite - a Community of Like-Minded Traders with the Goal to Code and Trade Profitable Automated Trading Bots.

Memberships

Skool Community

Public • 186.2k • Paid

36 contributions to Automated Traders Community
Closing trades by percentage gain per specific pair
Hi, I am working on how to best close positions in my EA. I currently close all positions after a 1% increase in equity. My problem is that I want to close positions only when a specific pair is up 1%. My issue is one pair may be up 2% and another -3% so neither will close and this leads to many positions building up and failing the EA. I attached what I have so far but am struggling with how to rewrite it calculate specifically per pair. Any help is appreciated. Thanks!
1
1
New comment Aug '23
Closing trades by percentage gain per specific pair
0 likes • Aug '23
You can use a for loop to count the profit of your EAs separately. After selecting a position you can check the magic number and/or the symbol and then add up all the profits with the same magic number only. Same for closing. You can set the magic number for your CTrade object variable before opening positions: https://www.mql5.com/de/docs/standardlibrary/tradeclasses/ctrade/ctradesetexpertmagicnumber
Same Strategy On Multiple Symbols
Besides the obvious opening multiple charts and adding the same EA, has anyone come up with an easy way to run the same strategy on different pairs with different inputs via one EA on one Chart? I know that it is possible, but not really sure of the best way to approach it... thanks,
0
4
New comment Aug '23
0 likes • Aug '23
https://www.youtube.com/watch?v=LmUookQc6Q4&list=PLeQQbTeiG3sDR-Y3SqL6O9-yC9FPxW0_j&pp=iAQB
Problems with EA (not much experience in programming)
Hello all. Thank you for welcoming me to the community. I trade since some time and also write the one or the other program. Currently, I am writing an EA and unfortunately I am stuck at a certain point and cannot find the error. I hope that maybe someone is here in the community who can help me? The problem is the following. If I start my computer and restart the MT 4, the EA opens new positions, however why. Unfortunately, I do not know what could be the reason that the EA constantly does something like this? If the MT4 is open all the time, the EA works fine. Does anyone know what could be the reason for this? I say thanks in advance for your comments.
0
15
New comment Aug '23
0 likes • Aug '23
@Dennis N I just did :D You can use the Sort function (ticketsBuy.Sort() and ticketsSell.Sort()) at the end of the OnInit. Cannot really say a lot about the notification problem. Does not seem like a coding issue. Just make sure that the program is not running on more than one PC at the same time.
0 likes • Aug '23
@Dennis N I literally just told you how to use it in my previous comment :D Also make sure to try to implement things on your own. You will never learn something if you just ask for help. Sorry to be this straight forward but it is just not how it works ;) https://www.mql5.com/de/docs/standardlibrary/datastructures/carray/carraysort In the MT4 Masterclass you can have a look at chapter 8 (OOP) and especially 8.08 (CArrayInt Class). With a little bit of work you will be able to figure it out.
Simple RSI Crossing EA; Feedback appreciated
Hey everyone, after getting ahead in Renés Masterclass, I wanted to create a simple RSI EA that checks when a 2 or 3 candle RSI crosses a longer term RSI like 14 candles. I would highly appreciate feedback and additional ideas in order to improve my skills! Thanks - Tobi
0
4
New comment Aug '23
0 likes • Aug '23
Great to hear that you write your own programs already. But would not this open multiple trades (with every tick)? Maybe you can make sure that there is only one trade per bar at maximum.
MqlTick Struct
Hi Rene The MqlTick Struct built into MT5 is very convenient for current bid/ask etc. Is there a reason you don't use this in your course instead of using the symbol info double function? I find it much quicker and easier to get current symbol info but perhaps there is something that is not as good? thanks,
0
2
New comment Aug '23
0 likes • Aug '23
Hey :) No the MqlTick struct is also a great way. If I also need the bid and ask price I usually just go with the SmybolInfoDouble. Both options take two lines of code (if you want bid and ask). So for me there is no real difference. SymbolInfoDouble might be slightly faster (I assume but not sure about this) and I do not think it will make a noticeable difference when it comes to the runtime. Whatever you prefer ;)
1-10 of 36
René Balke
4
78points to level up
@rene-balke-6091
Hey, I am René

Active 44m ago
Joined Jul 17, 2023
powered by