Hello sir, I have tested this EA good result small profit , my question , where input setting to make much profit ? i try set Risk percent input 5 ~ 10, yes profit make much profit, how other variable input sertting sir, where must be set ? Thank you
2 года назад+1
@@DeepMindID There is no "right" settings. Increasing the risk percentage will increse the profit of course but also the risk... Just do your own testing and see what you are comfortable with :)
Hey René! I'd like to point out that some may have issues with minimum stop levels depending on their broker/settings. SymbolInfoInteger(_Symbol,SYMBOL_TRADE_STOPS_LEVEL) will give you the minimum stop level and you can also adjust it in the strategy tester settings. click the golden $ icon next to where you choose the timeframe to get to the symbols settings and look for 'Stops level'. However, this is a superb tutorial. Thank you. It's really appreciated! Viele Grüße ausm Schwarzwald :P
Hello rené, this scalping ea is even developing into an interesting community project. Every day there are more comments that write about testing the EA and discuss optimizations - I find that unique on your channel in EA programming! Your comment and video pages are viewed so much more often by all interested visitors - a great idea with a lot of added value! A "Community EA" is the next big thing ;-)
Love the simplicity of this and you take on finding out highs and lows. This seems robust on some pairs with quick testing. I made my own variant where I eliminated some of already few input parameters. Now there is no settings left to impact entries to make it much harder to overfit :) In addition I added time filter to avoid last and first hours of the day. But also that is fixed to avoid overfitting. Pehaps I might still add one thing to stop earlier on Friday and close at end of Friday to avoid rare but potentially disasterous over the weekend trades. Then I consider if I use this later live. Vielen Dank und Grüss aus Berlin!
"Rene, your MQL5 playlist is an absolute gem! ✨ Each video feels like a journey into the heart of trading, filled with practical wisdom and insights that have truly enriched my understanding. 🚀 Your dedication to sharing this invaluable knowledge shines through every tutorial, making learning MQL5 not just educational but also deeply inspiring. 🙏 Thank you for lighting the path towards mastery in such a captivating way. Your work is a beacon of excellence in the trading community! 👏 Thank you, Rene! ❤ Love you so much! 💖
In the calclotb function you should always add somthing like 0.5 atr or smaller to the sldistance in order to prevent astronomous position sizings in case of very low sldistance which eventually happens and ruins the account if you set sldistance based on previous bar's lows or highs.
Hi Rene, thanks a lot for your big contribution to this teaching. You are truly amazing. You are a great help to many people. Just a suggestion, if possible, consider including some videos of coding the supply and demand zones strategy, as well as the inducement. Greetings and thank you very much.
thk you so much for all yr effort in teaching mt5. i have learn mt4 coding from youtube, now i relearn mt5 from watching all you video and gain a lot of valuable knowledges, thk you for yr hard work and commitment
2 года назад
Hey, I am glad to hear that you can learn something from the videos. Thanks for the support :)
Great tutorial Rene, really appreciate your efforts. There was lots of good things that I am adding to my own trading algo. Looking forward to your next one.
@ with such short trailing stops the entry seems to not matter; you can place random sells/buys and trail and will get the same results. try closing the position on the first profitable candle. thank you for the good effort.
@ Hi René, like your work. I am from germany, too. Learning MQL and Python on my own and I am very interested in financial markets. I followed along with your tutorials and now I just set your EA on my VPS for testing on a demo account. What kind of problems did you find? Thank you for your work and the aducational stuff. Greetings from Erlangen.
2 года назад
@@bigjeff7320 Hey, I will publish another video about this tomorrow where I show some of the problems that can occur in demo/livetrading :)
I think there is no need to code stop order. You could maybe just store the entry price in a variable and open position when the price is reached. Stop order is suitable for manual trading when trader can't watch the screen 24/7 but in the case of an EA it is not needed to create stop order. But it is my pov
Great video and EA 👌🏻 when testing it myself, I get totally different results when modelling with "Every tick" vs "Every tick based on real ticks". Is there a reason why? 🤔 XAUUSD is most dramatic from what I've seen so far. Still, incredible video and EA 👏🏻🙌🏻🙌🏻🙌🏻
Год назад
Thank you :)) I did not even test gold in the video :o but testing results can be really different. It depends on a lot of different factors. If you use another broker this might be one of them
Hi Rene, something you might like is to code an algo that enters on FVG's targeting the nearest opposing inefficiency or liquidity pool. Just an idea x
Hi Rene, I am a great fan of your channel. I leant a lot from your videos. One suggestion is to delete the source code that you posted in the comment of this video. It is the base code for the EA that you are selling in the market. Posting it may affect your selling stats. You have already described most logic in your video, that is already very generous!
Hi René. are you testing this EA live? . I have tried many backtests in some it is phenomenal, in others it is horrible. Now I decided to put it on 3 demo accounts and try
Rene very good job, you are very good autotrading ambasador :) This strategy seems like last swing high/low breakout or more over stophunting (usually there are sl’s above highs and below lows) ?
...i was testing this strategy, but is is only working for present market situation ....for long term ....it is not working with good profits and too much draw down as usual for all scalper... ;-) ...but i found an interesting solution ...just use a real AI ML DL Meta ...u will get super results !!! ...just switch over from static strategy to a real AI ...it works!!!
Great love your work. But there's a problem with risk management. The lot size calculator function seems to work fine with the values used in the video (riskpercent = 2, Sl = 200, and Tp =200). but if I change the Sl value to any point equal to or below 100 (100, 90, 80, 50,...., 5). The riskpercentage will be off (not accurate). Please help with a solution to the problem or possibly do a video, either way will be great. Looking forward 😸 to ur next video.
2 года назад+3
Yeah I think it is because it has to round the lots in this case and the percentage might be too high or two low. There is not solution for this due to the nature of position sizes that are limited to two digits after the decimal point :D
@ ok thanks for your and Help. I think ur the best at what u do, your coding programming skills are amazing. Looking forward to your next video. Thanks again
Hi Rene', Love your work. It seems the biggest problem with this EA based on the Wolf EA is when the trade triggers but it doesn't move enough in the profitable direction to move the initail StopLoss to a very tight StopLoss. In these cases it then loses, for example in the cse of the Wolf system, 20 pips which takes at least ten small profitable trade to make back this loss. Await your thoughts on this
2 года назад+4
Yeah that is basically the risk that you take with this EA. In the end it depends on the ratio of wins and losses. Hard to tell how it will look like after some month but I am testing it on a real account right now and I will give you an update on the channel :)
Can you please share the codes so that we can simply copy it as because it's very hard to type each and every thing manually cuz we're not expert like you sir❤❤❤❤BTW lots of love from India
Hello René Balke Thank you very much for creating this EA. I am also learning to follow the strategy of instead of buying stop/sell stop but using buy limit/sell limit as the lowest and highest position in the video. Sorry, there's an error. Can you make a video on how to use my strategy?
11 месяцев назад
Hey, I do not think I will make another video on this EA. But feel free to modify the EA as you like. If you want to learn more about MT5 programming you should also check out my complete course here: en.bmtrading.de/mt5-masterclass/
Danke für die tolle Idee für einen Scalper. Teste ich heute abend gleich mal. ATR-Filter wäre noch ne möglichkeit zur Performancesteigerung. Und evtl einsatz von ZigZag oder ähnlichem für die High/Lows.
Sir can u code one "Most Powerful Price Action Strategy with market structures", I see all of your videos, you have amazing logic thinking sir. I'm anxiously waiting for this reply & video.
2 года назад+1
Thanks for the kind feedback :) where can I see a description of this strategy?
I just tested the EA on EURUSD from 2015-2021 with 100% real tick data from Tickstory. On a $20.000 account risking 1% pr trade it produced over 100% profit with 2.64% drawdown. 17 consecutive winners and 1 consecutive loser. I mean, is it just me, or does this come close to the Holy Grail? But then again, when something seems to good to be true, it usually is. So what am I not taking into account here?
2 года назад+1
Watch my next video tomorrow and you will see ;) Unfortunately it is not that easy and the tester is not able to calculate the slippage correctly..
Thank you sir for great content, I really appreciate yoh effort, I learnt alot from this channel. Just one question sir, How do you check the last candlestick of the other symbol. For example, the current chart is nasdaq(H1) but you need to know the last candlestick of Ger30 (H1)for you to buy or sell.
2 года назад
It is always the same ;) you can use the iHigh, iLow, iClose... functions. Just change the symbol parameter.
Hey Rene, I have some questions about the program and hope for your opinion. Because we have the trailing stop we don't really need the TP (correct?) i have made some back tests with deactivated TP (setTp = false as input var) with better results, the question is here if this a good idea to not set a TP. I have also one improvement idea to readjust the SL if slippage hapend. It is possible to check whether there are any open orders. If there are any, I look at the entry price and save the previously set buy stop price. If they don't fit, I would adjust the SL.
2 года назад
Yeah all of these things are possible :) I did not have the time to test them though. Maybe I will in the future ;)
thank you sir for the content, incase of improving it how would i collect all lows and highs at each candle and compare them for optimal entry(instance finding gradient that fits well not overfitting or underfitting) and observe reversal entries 🙂
This was great ! Could you do a tutorial on how to buy low and sell high using the same concept. i try changing the buys to sells and sells to buys , but gets an error that i cannot resolve.
I`m having troubling to figure it out how to track order from a diferent conditions in the same advicer, any recomendation to log the posticket in some type of system ?...btw your content is spot on!!..thank for doing such use full videos
Год назад
Thanks :) you can just store the position tickets in some variable. Or work with different magic numbers for different positions.
Hi René, first of all thank you for your very useful work. I wanted to ask you for advice on how to set this expert on my 50k prop? having a low risk not to exceed the limit of any drawdown. Thank you.
Год назад+1
Hey, I am glad you like the content :) I cannot really help you though. Please just use the settings that you feel comfortable with. You can use the tester to get a feeling for usual drawdowns and average fluctuations of the EA.
I want to point out that the result is not realistic for the extremely small trailing stops, which is basically half a pip (5*_Digits). If you are testing this with a M1 resolution data this will always be triggered intra-bar with profit.
Hi Sir Rene, Nice Video, By the way, of all EA you've made, what is the best so far? and what EA you are using on your live account? And another thing, Do you have any idea how to code Williams' Percent Range? Thank You for the tutorial. I am learning so much.
2 года назад+1
Hey, right now it is a range breakout EA I think. But I did not test a lot of EAs in live trading for a longer period yet. I am using different strategies live.. donchian channel, atr and sar strategies also. I have no idea how to code wpr but it is a standard indicator I think. Why would you want to code it? You can just use it ;)
thank you very much for everything my friend... I have a question ... during the day the internet is cut off sometimes and the expert gets into the signal confusion, the open positions do not close... if the internet is cut, can a command be given to close the experte positions and stay disabled? I just want to know that ... you are loved 👍
2 года назад+1
I think that is not really possible. Since the internet is cut you cannot send messages to the broker server in this case ;) All you can do is provide a SL and TP and try to fix the internet as fast as possible. Also I can recommend working with a VPS in this case. They are usually really stable.
Rene , another great EA as usual , just a thought, would a trailing stop instead of TP not improve results ?, what needs to be removed in the code to enable this idea ?
2 года назад
Hey, the program uses a trailing stop ;) or do you want to remove the tp completely?? In this case you can just set the tp parameter for the BuyStop and SellStop function to 0.
Amazing as always! Especially with how fast you go about making these videos 😅 I was thinking for a system like this, I believe it would be very important to try an execute your orders within a max spread limit - that being said, my question to you is …is it possible to control order executions based on spread/slippage with Stop orders? I am able to control my orders with my EA as the orders are based on market buys/sells - not pre-placed stop orders
2 года назад+1
Hey, I think it does not really work with stop orders. You would have to use limit orders instead to prevent slippage I think. But in this case you do not always get the execution. And spread is also a tricky topic since it can change everything. But you could still use some kind of spread or time filter to prevent order executions at times when the spread is usually big. You can just delete existing orders and stop placing new orders then.
@ I see, my thoughts exactly, thank you for confirming and further explanation! I only raise this concern as I ran this EA with Gold (volatile spread ranges) and in one instance, the stop order was triggered due to high spread, but stoploss wasn’t..happened so fast, by the time the EA closed due to sl condition, the loss was very big! Just thought I would share my experience :) Thanks again for your videos
2 года назад
@@rashadj1832 Yes I think gold is a tough market for this system. I also use a different EA in gold and it is also struggling with slippage -.-
I have a dumb request but I don't know how to code so I have to ask... can you please code an Fiboacci EA that buys or sells at 15 percent in either direction and Takes profit at level 61.8
Thanks for this tutorial. Would kindly request you to have a tutorial on Zigzag. I've been trying some project on it and seems to get issues in locking down on the Previous High and Low. The buffers are not giving me what i need.
2 года назад
Have a look at this: ruclips.net/video/DxmKwJy2r5E/видео.html&ab_channel=Ren%C3%A9Balke Maybe it helps :)
Hey rene, how to have the EA not start from looking for highs/lows from the right to the left side. Instead have it start from the left side of the chart then look for high/low on the right side? If im correct, would i just have to change the loop from i-- to i++?
Thank you very much for this wonderful programming tutorial. I'm a newbie 😵 just learning programming from MT4 so I'd like to ask if it's not too much trouble for you. Can you make a clip of this strategy in MT4 format? Thanks in advance for your kindness and sacrifice. I will be following and supporting you all the time. 🙏👍
2 года назад
Hey, I am glad you like it. I do not think I will make a mt4 tutorial since I focus on mql5 on this channel right now. I am sorry :/
@ Thanks for the reply and I appreciate your attention. And don't worry about that. I will try to learn more. And if there is an opportunity, I would like to send you the MT4 code using this strategy to consult with you in the future.thanks again And I always wish you happiness.
2 года назад
@@worapotardsri4454 No I am sorry but I cannot provide individual support :/
Hi Rene, its quite late for the comment now but i think there might be a problem in the position size calculation if the EA is activated in a market like the DAX. I backtestet it with Lots: 0.1 and Riskpercent: 1.0 (10k Account so 1% should be 100€ Risk per Trade). In some Backtests the average loss is 100€ but in some backtests its scaled times 10 or the average loss is 300€. This seems pretty odd to me and i couldnt find any slippage (or other) reasons which couldve caused it. Maybe you have an idea what could be the cause for this weird bug. Thanks in advance ^^
2 года назад+1
Yeah that is super weird. But I did not experience this problem before. I am sorry but I do not have a quick solution for this. Just check the code carefully and maybe you can modify it to fit your needs.
@ :( I don't know how to program boss. Please what are the two input bool I'm to use🙏🙏 sorry I'm asking too much. Please boss.
2 года назад
@@chideraV have a look at some of the programming tutorials on this channel. I am sorry but I cannot respond to individual request. There are just too many :O
HI RENE. this code really work, but i have a problem. When I put commission on the emulate slippage tab bla bla , this commission is not taken into account in the simulator, I can't get it to take the commissions into account. because it can be?
Hello Sir, If you add trailing stop to this expert, the map will work. how can i do this, i have no knowledge of mql od i would love to help you, best regards I got the code in your pinned message, I'm testing it in the demo. As I said, if there is a tralign stop, this robot will be 100% profitable.
Hi Rene could you send me the full update program Ion this scalping strategy because when I try to follow your tutorial I have Two many errors. I just wanna compare and check where did I go wrong or what I miss. I try to pause the video several times but still got too many errors. Many thanks in advance.
2 года назад+1
Check out the first comment that I pinned. You will find the complete source code :)
I copied the source code and created it into an ea on mt5 will it still work perfectly fine, if so how can I increase lot size do I do this by changing % from 2.0 to like 50.0 or 80.0 will this do lot size change?
Rene can you explain how TSL, TSL trigger points work on this EA. Copied the source code. Seems like on my platform EA doesn't closes positions with trigger points. Is it pips (1pip = 10points) or something else. For me i thought 5 tsl points mean when price enters in TP area after 5 points TSL activates once price backwards it should close the orders. Is it right?
Hi Rene , how can the opposite order be cancelled if Buy Stop or Sell Stop is triggered. IOW, EA places 2 trades all the time , when either trade is executed , buy stop triggered then existing sell stop cancelled, and a new sell will be triggered by new parameters for sell stop
My friend, you are doing great work, congratulations, Long live programmers like you, but we are not as good as you at this, This is my request from you and if you can put a download link for the experts you will code from now on, it would be great, for example how can I download the expert you made, thank you :)
2 года назад+1
Bro check the comments. I pinned one with the source code ;)
Hi Rene another great project, i have coded everything but have an error and i'm battling to find reasons for - " ticksize" & "tickvalue" undeclared identifier on code line 163 which is identical to the code line on the video, Please any thoughts for the error ? . Thanks
Год назад
Thanks :) check the code again please. Did you declare the ticksize and tickvalue variables?
Hi Rene , I tested many times the strategy , but every time in long term the strategy fail and lose money , i tested on eur/usd H1 , but the results are not good. I want to please you , can you share the source on the strategy that you present here in RUclips, Range break out System ( You tested in Usd /Jpy that the EA starts at 2.00 and finish in 3.30 at the morning) . I would be thankful if you share the code here . Have a nice day Rene
2 года назад
Hey, I share the code of the range breakout here: en.bmtrading.de/mt5-masterclass/ It will not be on RUclips I am sorry.
Du hast einen Delay von 116ms eingestellt. hat das einen genauen Grund? Ich versuche diese Strategie in mein EA Framework einzubauen und frage mich, mit welchem Delay diese Strategie maximal arbeiten kann..
Год назад
Nein ich glaube das war so standardmäßig hinterlegt bei mir ;)
I want to test it on synthesis index using deriv brokers. Want to test it on Volatilities 75. smallest lot size is 0.001, help me with the default settings
Hey Rene, I followed along in this video (awesome video, thank you very much) and my code runs perfectly. However, when I test it the profit is less than if I test it with your source code. Did you make any noticeable changes in your source code that you posted in the comments? Thanks!
2 года назад+1
Hey, no I do not think I changed the code here. But the testing results depend on many factors. If you use a different broker for example you will get different results.
@ also, does the high and low constantly update to the most recent high and low? (The high or low needs 5 candles before and after to be considered valid right?)
2 года назад+1
@@fulkrumfx you can define the expiration period of the orders. If you enter a small value (like 1) it will always take the last high/low.
@ I’m currently using default settings. Right now do you have an order on EU for a buy at 0.98726 (I would just like to make sure that it’s functioning as intended using the default settings). I’m running the EA on a demo too 🙌🏻 thanks for answering the questions!
2 года назад
@@fulkrumfx bro I am sorry but I don't even run the program :O
Source Code:
#define VERSION "1.0"
#property version VERSION
#define PROJECT_NAME MQLInfoString(MQL_PROGRAM_NAME)
#include
input double Lots = 0.1;
input double RiskPercent = 2.0; //RiskPercent (0 = Fix)
input int OrderDistPoints = 200;
input int TpPoints = 200;
input int SlPoints = 200;
input int TslPoints = 5;
input int TslTriggerPoints = 5;
input ENUM_TIMEFRAMES Timeframe = PERIOD_H1;
input int BarsN = 5;
input int ExpirationHours = 50;
input int Magic = 111;
CTrade trade;
ulong buyPos, sellPos;
int totalBars;
int OnInit(){
trade.SetExpertMagicNumber(Magic);
if(!trade.SetTypeFillingBySymbol(_Symbol)){
trade.SetTypeFilling(ORDER_FILLING_RETURN);
}
static bool isInit = false;
if(!isInit){
isInit = true;
Print(__FUNCTION__," > EA (re)start...");
Print(__FUNCTION__," > EA version ",VERSION,"...");
for(int i = PositionsTotal()-1; i >= 0; i--){
CPositionInfo pos;
if(pos.SelectByIndex(i)){
if(pos.Magic() != Magic) continue;
if(pos.Symbol() != _Symbol) continue;
Print(__FUNCTION__," > Found open position with ticket #",pos.Ticket(),"...");
if(pos.PositionType() == POSITION_TYPE_BUY) buyPos = pos.Ticket();
if(pos.PositionType() == POSITION_TYPE_SELL) sellPos = pos.Ticket();
}
}
for(int i = OrdersTotal()-1; i >= 0; i--){
COrderInfo order;
if(order.SelectByIndex(i)){
if(order.Magic() != Magic) continue;
if(order.Symbol() != _Symbol) continue;
Print(__FUNCTION__," > Found pending order with ticket #",order.Ticket(),"...");
if(order.OrderType() == ORDER_TYPE_BUY_STOP) buyPos = order.Ticket();
if(order.OrderType() == ORDER_TYPE_SELL_STOP) sellPos = order.Ticket();
}
}
}
return(INIT_SUCCEEDED);
}
void OnDeinit(const int reason){
}
void OnTick(){
processPos(buyPos);
processPos(sellPos);
int bars = iBars(_Symbol,Timeframe);
if(totalBars != bars){
totalBars = bars;
if(buyPos 0){
executeBuy(high);
}
}
if(sellPos 0){
executeSell(low);
}
}
}
}
void OnTradeTransaction(
const MqlTradeTransaction& trans,
const MqlTradeRequest& request,
const MqlTradeResult& result
){
if(trans.type == TRADE_TRANSACTION_ORDER_ADD){
COrderInfo order;
if(order.Select(trans.order)){
if(order.Magic() == Magic){
if(order.OrderType() == ORDER_TYPE_BUY_STOP){
buyPos = order.Ticket();
}else if(order.OrderType() == ORDER_TYPE_SELL_STOP){
sellPos = order.Ticket();
}
}
}
}
}
void processPos(ulong &posTicket){
if(posTicket pos.PriceOpen() + TslTriggerPoints * _Point){
double sl = bid - TslPoints * _Point;
sl = NormalizeDouble(sl,_Digits);
if(sl > pos.StopLoss()){
trade.PositionModify(pos.Ticket(),sl,pos.TakeProfit());
}
}
}else if(pos.PositionType() == POSITION_TYPE_SELL){
double ask = SymbolInfoDouble(_Symbol,SYMBOL_ASK);
if(ask < pos.PriceOpen() - TslTriggerPoints * _Point){
double sl = ask + TslPoints * _Point;
sl = NormalizeDouble(sl,_Digits);
if(sl < pos.StopLoss() || pos.StopLoss() == 0){
trade.PositionModify(pos.Ticket(),sl,pos.TakeProfit());
}
}
}
}
}
void executeBuy(double entry){
entry = NormalizeDouble(entry,_Digits);
double ask = SymbolInfoDouble(_Symbol,SYMBOL_ASK);
if(ask > entry - OrderDistPoints * _Point) return;
double tp = entry + TpPoints * _Point;
tp = NormalizeDouble(tp,_Digits);
double sl = entry - SlPoints * _Point;
sl = NormalizeDouble(sl,_Digits);
double lots = Lots;
if(RiskPercent > 0) lots = calcLots(entry-sl);
datetime expiration = iTime(_Symbol,Timeframe,0) + ExpirationHours * PeriodSeconds(PERIOD_H1);
trade.BuyStop(lots,entry,_Symbol,sl,tp,ORDER_TIME_SPECIFIED,expiration);
buyPos = trade.ResultOrder();
}
void executeSell(double entry){
entry = NormalizeDouble(entry,_Digits);
double bid = SymbolInfoDouble(_Symbol,SYMBOL_BID);
if(bid < entry + OrderDistPoints * _Point) return;
double tp = entry - TpPoints * _Point;
tp = NormalizeDouble(tp,_Digits);
double sl = entry + SlPoints * _Point;
sl = NormalizeDouble(sl,_Digits);
double lots = Lots;
if(RiskPercent > 0) lots = calcLots(sl-entry);
datetime expiration = iTime(_Symbol,Timeframe,0) + ExpirationHours * PeriodSeconds(PERIOD_H1);
trade.SellStop(lots,entry,_Symbol,sl,tp,ORDER_TIME_SPECIFIED,expiration);
sellPos = trade.ResultOrder();
}
double calcLots(double slPoints){
double risk = AccountInfoDouble(ACCOUNT_BALANCE) * RiskPercent / 100;
double ticksize = SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_SIZE);
double tickvalue = SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE);
double lotstep = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP);
double moneyPerLotstep = slPoints / ticksize * tickvalue * lotstep;
double lots = MathFloor(risk / moneyPerLotstep) * lotstep;
lots = MathMin(lots,SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX));
lots = MathMax(lots,SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN));
return lots;
}
double findHigh(){
double highestHigh = 0;
for(int i = 0; i < 200; i++){
double high = iHigh(_Symbol,Timeframe,i);
if(i > BarsN && iHighest(_Symbol,Timeframe,MODE_HIGH,BarsN*2+1,i-BarsN) == i){
if(high > highestHigh){
return high;
}
}
highestHigh = MathMax(high,highestHigh);
}
return -1;
}
double findLow(){
double lowestLow = DBL_MAX;
for(int i = 0; i < 200; i++){
double low = iLow(_Symbol,Timeframe,i);
if(i > BarsN && iLowest(_Symbol,Timeframe,MODE_LOW,BarsN*2+1,i-BarsN) == i){
if(low < lowestLow){
return low;
}
}
lowestLow = MathMin(low,lowestLow);
}
return -1;
}
@@LordFury83 hey thank you :) I turned off the direct messages so probably won't see it. Thanks for watching the videos!
@ would you be open to writing a custom EA for my business...Anywhere else where we could talk then..?
@@LordFury83 no I am sorry but I do not offer this service
Hello sir,
I have tested this EA good result small profit , my question , where input setting to make much profit ?
i try set Risk percent input 5 ~ 10, yes profit make much profit, how other variable input sertting sir, where must be set ?
Thank you
@@DeepMindID There is no "right" settings. Increasing the risk percentage will increse the profit of course but also the risk... Just do your own testing and see what you are comfortable with :)
You can create a Spread function to return the spread value and add the condition 'if (Spread()
Hey René!
I'd like to point out that some may have issues with minimum stop levels depending on their broker/settings. SymbolInfoInteger(_Symbol,SYMBOL_TRADE_STOPS_LEVEL) will give you the minimum stop level and you can also adjust it in the strategy tester settings. click the golden $ icon next to where you choose the timeframe to get to the symbols settings and look for 'Stops level'.
However, this is a superb tutorial. Thank you. It's really appreciated!
Viele Grüße ausm Schwarzwald :P
Hello rené, this scalping ea is even developing into an interesting community project. Every day there are more comments that write about testing the EA and discuss optimizations - I find that unique on your channel in EA programming! Your comment and video pages are viewed so much more often by all interested visitors - a great idea with a lot of added value! A "Community EA" is the next big thing ;-)
Was looking forward to this since the Wolf Scalper review!:) Great to have some more non-beginning programming material
Love the simplicity of this and you take on finding out highs and lows. This seems robust on some pairs with quick testing. I made my own variant where I eliminated some of already few input parameters. Now there is no settings left to impact entries to make it much harder to overfit :) In addition I added time filter to avoid last and first hours of the day. But also that is fixed to avoid overfitting. Pehaps I might still add one thing to stop earlier on Friday and close at end of Friday to avoid rare but potentially disasterous over the weekend trades. Then I consider if I use this later live. Vielen Dank und Grüss aus Berlin!
Best Teacher have watched online for Auto trading Programming
Wow, nice sir. I'm back-testing it and it shows great results. Hope to get it on live account soon, thanks a lot man
"Rene, your MQL5 playlist is an absolute gem! ✨ Each video feels like a journey into the heart of trading, filled with practical wisdom and insights that have truly enriched my understanding. 🚀 Your dedication to sharing this invaluable knowledge shines through every tutorial, making learning MQL5 not just educational but also deeply inspiring. 🙏 Thank you for lighting the path towards mastery in such a captivating way. Your work is a beacon of excellence in the trading community! 👏
Thank you, Rene! ❤ Love you so much! 💖
Man this is amaizing thank you so much now after i trade my 5h a day i can just leave the ea runing and leting it enter trades for that extra bux.
This is more Institutional trade idea from what I see. Basically following orderblock. Thanks Ren
this guy deserves moreee subs and like. Free ea coding aint no wayy!!! YOU ARE THE BESTTT FOR TEACHING US ON HOW TO CODE EA!!!
Haha thanks :) you can always recommend the channel if you like
Thanks Rene. You're in a league of your own.
In the calclotb function you should always add somthing like 0.5 atr or smaller to the sldistance in order to prevent astronomous position sizings in case of very low sldistance which eventually happens and ruins the account if you set sldistance based on previous bar's lows or highs.
Hi Rene, thanks a lot for your big contribution to this teaching. You are truly amazing. You are a great help to many people. Just a suggestion, if possible, consider including some videos of coding the supply and demand zones strategy, as well as the inducement.
Greetings and thank you very much.
thk you so much for all yr effort in teaching mt5. i have learn mt4 coding from youtube, now i relearn mt5 from watching all you video and gain a lot of valuable knowledges, thk you for yr hard work and commitment
Hey, I am glad to hear that you can learn something from the videos. Thanks for the support :)
This is amazing. Love the pace! And truly excellent explanations.
Great tutorial Rene, really appreciate your efforts. There was lots of good things that I am adding to my own trading algo. Looking forward to your next one.
I think this is a great project Rene! Thanks again for the effort and hard work! Learning alot from your channel!
Hey I am happy to hear that! Thanks for the support :)
Great Tutorial again Rene. I've become a big fan of yours!
Thank you!! I am glad you like the videos :)
Congratulations for content! Hello from Brazil!
Danke für dieses tolle Video! Werde gleich Mal damit anfangen es selbst zu testen. Bitte mehr davon
My king you never disappoint when it comes to EA programming please create a video a tutorial for a Swing or intraday EA thanks..... mastermind.
Looks great. Performance like grid system (in shape at least) but without big drawdowns. Waiting for final version + demo test from a month.
Yeah I am running it on a demo already and saw first problems. We will see if it can still perform or if it just shines in a testing environment ;)
@ with such short trailing stops the entry seems to not matter; you can place random sells/buys and trail and will get the same results. try closing the position on the first profitable candle. thank you for the good effort.
@ Hi René, like your work. I am from germany, too. Learning MQL and Python on my own and I am very interested in financial markets. I followed along with your tutorials and now I just set your EA on my VPS for testing on a demo account. What kind of problems did you find? Thank you for your work and the aducational stuff. Greetings from Erlangen.
@@bigjeff7320 Hey, I will publish another video about this tomorrow where I show some of the problems that can occur in demo/livetrading :)
Did you fix the problems? Is it still working? @
I think there is no need to code stop order. You could maybe just store the entry price in a variable and open position when the price is reached. Stop order is suitable for manual trading when trader can't watch the screen 24/7 but in the case of an EA it is not needed to create stop order. But it is my pov
Awesome work! This gave me a few ideas for my own projects! Thanks for sharing!!!
Great video and EA 👌🏻 when testing it myself, I get totally different results when modelling with "Every tick" vs "Every tick based on real ticks". Is there a reason why? 🤔 XAUUSD is most dramatic from what I've seen so far. Still, incredible video and EA 👏🏻🙌🏻🙌🏻🙌🏻
Thank you :)) I did not even test gold in the video :o but testing results can be really different. It depends on a lot of different factors. If you use another broker this might be one of them
Amazing coding lesson, learning so much.... thank you for sharing
Rene, your channel is gold and this strategy is amazing - it looks very promising.
Thank you for sharing.
:)
Thanks Rene for another great tutorial
Hi Rene, something you might like is to code an algo that enters on FVG's targeting the nearest opposing inefficiency or liquidity pool. Just an idea x
Liked and subscribed. Great content bro. Thanks for the sauce.
Hey, great video. Thank you😄 keep up the good work!
Hi Rene, I am a great fan of your channel. I leant a lot from your videos. One suggestion is to delete the source code that you posted in the comment of this video. It is the base code for the EA that you are selling in the market. Posting it may affect your selling stats. You have already described most logic in your video, that is already very generous!
Thank you :)
Hi Rene, thanks for the amazing code.. im no good programmer, but I m looking forward to test it on my account..
The results are impressive !
Yeah but this was just the mt5 tester. You should watch the video that I will publish today where I talk about it some more ;)
@ Can`t wait to watch it.
Hi René. are you testing this EA live? . I have tried many backtests in some it is phenomenal, in others it is horrible. Now I decided to put it on 3 demo accounts and try
Hello Rene, please any chance you could add trading hours filter to this. Thank you for your great effort as always
Rene very good job, you are very good autotrading ambasador :) This strategy seems like last swing high/low breakout or more over stophunting (usually there are sl’s above highs and below lows) ?
Thank you
...i was testing this strategy, but is is only working for present market situation ....for long term ....it is not working with good profits and too much draw down as usual for all scalper... ;-) ...but i found an interesting solution ...just use a real AI ML DL Meta ...u will get super results !!! ...just switch over from static strategy to a real AI ...it works!!!
Thanks ❤ , we learn the truth from you, we love you, man .
Regarding your masters class, may you have to make more discounts for us please 🙏
Thank you for another great tutorial.😊
Hi Balke, that's really cool, thank you for share.
Btw, how's your demo account of this EA, is this work in real environment?
I run it in a live account. You can see it here: www.mql5.com/en/signals/1772283
This on GBPUSD with 40/40 on SL and TP. And 10/10 on both tslpoints. The profit goes trough the roof
Great love your work. But there's a problem with risk management. The lot size calculator function seems to work fine with the values used in the video (riskpercent = 2, Sl = 200, and Tp =200). but if I change the Sl value to any point equal to or below 100 (100, 90, 80, 50,...., 5). The riskpercentage will be off (not accurate). Please help with a solution to the problem or possibly do a video, either way will be great. Looking forward 😸 to ur next video.
Yeah I think it is because it has to round the lots in this case and the percentage might be too high or two low. There is not solution for this due to the nature of position sizes that are limited to two digits after the decimal point :D
@Thanks for the explanations. And I think I understand what your saying. So how Would you solve this issue? Is it solvable?
@@TobechiOgaziechi no there is not solution.
@ ok thanks for your and Help. I think ur the best at what u do, your coding programming skills are amazing. Looking forward to your next video. Thanks again
Thanks for the content. Great job!
Hi Rene', Love your work. It seems the biggest problem with this EA based on the Wolf EA is when the trade triggers but it doesn't move enough in the profitable direction to move the initail StopLoss to a very tight StopLoss. In these cases it then loses, for example in the cse of the Wolf system, 20 pips which takes at least ten small profitable trade to make back this loss. Await your thoughts on this
Yeah that is basically the risk that you take with this EA. In the end it depends on the ratio of wins and losses. Hard to tell how it will look like after some month but I am testing it on a real account right now and I will give you an update on the channel :)
Hey Rene,Zwela here....I loved our next tutorial to be on building a gartley harmonic indicator scanner plz.
Hey, I don't really know what that is :D but maybe I can do it in the future if more people request it :)
Can you please share the codes so that we can simply copy it as because it's very hard to type each and every thing manually cuz we're not expert like you sir❤❤❤❤BTW lots of love from India
Greetings to you, very excellent and informative
Hello René Balke
Thank you very much for creating this EA.
I am also learning to follow the strategy of instead of buying stop/sell stop but using buy limit/sell limit as the lowest and highest position in the video. Sorry, there's an error.
Can you make a video on how to use my strategy?
Hey, I do not think I will make another video on this EA. But feel free to modify the EA as you like. If you want to learn more about MT5 programming you should also check out my complete course here: en.bmtrading.de/mt5-masterclass/
Danke für die tolle Idee für einen Scalper. Teste ich heute abend gleich mal. ATR-Filter wäre noch ne möglichkeit zur Performancesteigerung. Und evtl einsatz von ZigZag oder ähnlichem für die High/Lows.
thanks you rene this is quality....
Sir can u code one "Most Powerful Price Action Strategy with market structures", I see all of your videos, you have amazing logic thinking sir.
I'm anxiously waiting for this reply & video.
Thanks for the kind feedback :) where can I see a description of this strategy?
"Sophia Golden Version " - by classic forex trader
Hi my freind, is your Expert can working for live account also ? Or you have another video for the live accpint? Thank you Bro. 👍
Hi Renee, this is a really great strategy i have ever seen, can this work with $50 USD small live account?
result in to $50 USD small live account? and what is broker use?
I just tested the EA on EURUSD from 2015-2021 with 100% real tick data from Tickstory. On a $20.000 account risking 1% pr trade it produced over 100% profit with 2.64% drawdown. 17 consecutive winners and 1 consecutive loser. I mean, is it just me, or does this come close to the Holy Grail? But then again, when something seems to good to be true, it usually is. So what am I not taking into account here?
Watch my next video tomorrow and you will see ;) Unfortunately it is not that easy and the tester is not able to calculate the slippage correctly..
@ Ah. Ok. I'll sit on my hands until then. ;)
Thank you sir for great content, I really appreciate yoh effort, I learnt alot from this channel.
Just one question sir, How do you check the last candlestick of the other symbol. For example, the current chart is nasdaq(H1) but you need to know the last candlestick of Ger30 (H1)for you to buy or sell.
It is always the same ;) you can use the iHigh, iLow, iClose... functions. Just change the symbol parameter.
@ OK sir, so does that mean even if the symbol is not opened the ea can still check its information?
@@yourworld...3699 yes :)
@ Thank you sir.
33:50 check the spread 1 pip before the price hits the limit order, right?
You are amazing man
Hey Rene,
I have some questions about the program and hope for your opinion. Because we have the trailing stop we don't really need the TP (correct?) i have made some back tests with deactivated TP (setTp = false as input var) with better results, the question is here if this a good idea to not set a TP. I have also one improvement idea to readjust the SL if slippage hapend. It is possible to check whether there are any open orders. If there are any, I look at the entry price and save the previously set buy stop price. If they don't fit, I would adjust the SL.
Yeah all of these things are possible :) I did not have the time to test them though. Maybe I will in the future ;)
thank you sir for the content, incase of improving it how would i collect all lows and highs at each candle and compare them for optimal entry(instance finding gradient that fits well not overfitting or underfitting) and observe reversal entries
🙂
This was great !
Could you do a tutorial on how to buy low and sell high using the same concept.
i try changing the buys to sells and sells to buys , but gets an error that i cannot resolve.
I`m having troubling to figure it out how to track order from a diferent conditions in the same advicer, any recomendation to log the posticket in some type of system ?...btw your content is spot on!!..thank for doing such use full videos
Thanks :) you can just store the position tickets in some variable. Or work with different magic numbers for different positions.
Hi René, first of all thank you for your very useful work. I wanted to ask you for advice on how to set this expert on my 50k prop? having a low risk not to exceed the limit of any drawdown. Thank you.
Hey, I am glad you like the content :) I cannot really help you though. Please just use the settings that you feel comfortable with. You can use the tester to get a feeling for usual drawdowns and average fluctuations of the EA.
I want to point out that the result is not realistic for the extremely small trailing stops, which is basically half a pip (5*_Digits). If you are testing this with a M1 resolution data this will always be triggered intra-bar with profit.
thank you for your contribution.
Hi Sir Rene, Nice Video, By the way, of all EA you've made, what is the best so far? and what EA you are using on your live account? And another thing, Do you have any idea how to code Williams' Percent Range? Thank You for the tutorial. I am learning so much.
Hey, right now it is a range breakout EA I think. But I did not test a lot of EAs in live trading for a longer period yet. I am using different strategies live.. donchian channel, atr and sar strategies also. I have no idea how to code wpr but it is a standard indicator I think. Why would you want to code it? You can just use it ;)
@ Sir, Thank You. I mean WPR EA. anyway thanks for the respond Sir Rene.
thank you very much for everything my friend... I have a question ... during the day the internet is cut off sometimes and the expert gets into the signal confusion, the open positions do not close... if the internet is cut, can a command be given to close the experte positions and stay disabled? I just want to know that ... you are loved 👍
I think that is not really possible. Since the internet is cut you cannot send messages to the broker server in this case ;) All you can do is provide a SL and TP and try to fix the internet as fast as possible. Also I can recommend working with a VPS in this case. They are usually really stable.
@ thanks bro 👍I understood
Rene , another great EA as usual , just a thought, would a trailing stop instead of TP not improve results ?, what needs to be removed in the code to enable this idea ?
Hey, the program uses a trailing stop ;) or do you want to remove the tp completely?? In this case you can just set the tp parameter for the BuyStop and SellStop function to 0.
@ Perfect , Thanks Rene 😀
hi, Are you running this ea on demo account? how is it going?
Sir I want to learn how to create an Expert Advisor,
Yours Lectures are very help full ,
Which country you belong Sir ?
Hey, you should check my out complete mql5 course: en.bmtrading.de/mt5-masterclass/
I am German :)
Amazing as always! Especially with how fast you go about making these videos 😅 I was thinking for a system like this, I believe it would be very important to try an execute your orders within a max spread limit - that being said, my question to you is …is it possible to control order executions based on spread/slippage with Stop orders? I am able to control my orders with my EA as the orders are based on market buys/sells - not pre-placed stop orders
Hey, I think it does not really work with stop orders. You would have to use limit orders instead to prevent slippage I think. But in this case you do not always get the execution. And spread is also a tricky topic since it can change everything. But you could still use some kind of spread or time filter to prevent order executions at times when the spread is usually big. You can just delete existing orders and stop placing new orders then.
@ I see, my thoughts exactly, thank you for confirming and further explanation! I only raise this concern as I ran this EA with Gold (volatile spread ranges) and in one instance, the stop order was triggered due to high spread, but stoploss wasn’t..happened so fast, by the time the EA closed due to sl condition, the loss was very big! Just thought I would share my experience :) Thanks again for your videos
@@rashadj1832 Yes I think gold is a tough market for this system. I also use a different EA in gold and it is also struggling with slippage -.-
I have a dumb request but I don't know how to code so I have to ask... can you please code an Fiboacci EA that buys or sells at 15 percent in either direction and Takes profit at level 61.8
Thanks for this tutorial. Would kindly request you to have a tutorial on Zigzag. I've been trying some project on it and seems to get issues in locking down on the Previous High and Low. The buffers are not giving me what i need.
Have a look at this: ruclips.net/video/DxmKwJy2r5E/видео.html&ab_channel=Ren%C3%A9Balke
Maybe it helps :)
Hey rene, how to have the EA not start from looking for highs/lows from the right to the left side. Instead have it start from the left side of the chart then look for high/low on the right side? If im correct, would i just have to change the loop from i-- to i++?
Thank you very much for this wonderful programming tutorial. I'm a newbie 😵 just learning programming from MT4 so I'd like to ask if it's not too much trouble for you. Can you make a clip of this strategy in MT4 format? Thanks in advance for your kindness and sacrifice. I will be following and supporting you all the time. 🙏👍
Hey, I am glad you like it. I do not think I will make a mt4 tutorial since I focus on mql5 on this channel right now. I am sorry :/
@ Thanks for the reply and I appreciate your attention. And don't worry about that. I will try to learn more. And if there is an opportunity, I would like to send you the MT4 code using this strategy to consult with you in the future.thanks again And I always wish you happiness.
@@worapotardsri4454 No I am sorry but I cannot provide individual support :/
Hi Rene, its quite late for the comment now but i think there might be a problem in the position size calculation if the EA is activated in a market like the DAX. I backtestet it with Lots: 0.1 and Riskpercent: 1.0 (10k Account so 1% should be 100€ Risk per Trade). In some Backtests the average loss is 100€ but in some backtests its scaled times 10 or the average loss is 300€. This seems pretty odd to me and i couldnt find any slippage (or other) reasons which couldve caused it.
Maybe you have an idea what could be the cause for this weird bug. Thanks in advance ^^
Yeah that is super weird. But I did not experience this problem before. I am sorry but I do not have a quick solution for this. Just check the code carefully and maybe you can modify it to fit your needs.
Awesome works Sir! Is there a way I can select either for it to take buy or sell stops only.. or maybe both?.
Thank you :) You would have to add some code for this. Just use two input bool variable and then check them before sending the orders.
@ :( I don't know how to program boss. Please what are the two input bool I'm to use🙏🙏 sorry I'm asking too much. Please boss.
@@chideraV have a look at some of the programming tutorials on this channel. I am sorry but I cannot respond to individual request. There are just too many :O
@ Alright Boss! Thanks alot
HI RENE. this code really work, but i have a problem. When I put commission on the emulate slippage tab bla bla , this commission is not taken into account in the simulator, I can't get it to take the commissions into account. because it can be?
I am pretty sure wolf scalper ea is using the zigzag indicator as its entry points. Did you happen to test it?
Could be like this. No I did not test this yet.. 🤔
is the MT5 programming course free ?
Hello Sir,
If you add trailing stop to this expert, the map will work.
how can i do this, i have no knowledge of mql od
i would love to help you, best regards
I got the code in your pinned message, I'm testing it in the demo. As I said, if there is a tralign stop, this robot will be 100% profitable.
Bro it HAS a trailing stop :D ;)
@ very slow :) :)
Hi Rene could you send me the full update program Ion this scalping strategy because when I try to follow your tutorial I have Two many errors. I just wanna compare and check where did I go wrong or what I miss. I try to pause the video several times but still got too many errors. Many thanks in advance.
Check out the first comment that I pinned. You will find the complete source code :)
ca u try make it more aggresive .... like 500.....5000% profit?
Hello Rene, i have been following along with you but I have 12 errors, that i can't find a solution to.
Hello, are you using OHCL or realtick for testing?
Does it make a difference for this EA?
I use the every tick based on real ticks modelling method. It absolutely makes a difference ;)
@ thank for your reply
I copied the source code and created it into an ea on mt5 will it still work perfectly fine, if so how can I increase lot size do I do this by changing % from 2.0 to like 50.0 or 80.0 will this do lot size change?
Rene can you explain how TSL, TSL trigger points work on this EA. Copied the source code. Seems like on my platform EA doesn't closes positions with trigger points. Is it pips (1pip = 10points) or something else. For me i thought 5 tsl points mean when price enters in TP area after 5 points TSL activates once price backwards it should close the orders. Is it right?
Update about this topic?
Hi Rene , how can the opposite order be cancelled if Buy Stop or Sell Stop is triggered. IOW, EA places 2 trades all the time , when either trade is executed , buy stop triggered then existing sell stop cancelled, and a new sell will be triggered by new parameters for sell stop
My friend, you are doing great work, congratulations,
Long live programmers like you,
but we are not as good as you at this,
This is my request from you and if you can put a download link for the experts you will code from now on, it would be great, for example how can I download the expert you made, thank you :)
Bro check the comments. I pinned one with the source code ;)
Hi Rene another great project, i have coded everything but have an error and i'm battling to find reasons for - " ticksize" & "tickvalue" undeclared identifier on code line 163 which is identical to the code line on the video, Please any thoughts for the error ? . Thanks
Thanks :) check the code again please. Did you declare the ticksize and tickvalue variables?
Hi Rene , I tested many times the strategy , but every time in long term the strategy fail and lose money , i tested on eur/usd H1 , but the results are not good.
I want to please you , can you share the source on the strategy that you present here in RUclips, Range break out System ( You tested in Usd /Jpy that the EA starts at 2.00 and finish in 3.30 at the morning) . I would be thankful if you share the code here . Have a nice day Rene
Hey, I share the code of the range breakout here: en.bmtrading.de/mt5-masterclass/
It will not be on RUclips I am sorry.
@ I saw that the masterclass coat 470 euro, for me is impossible this kind of sum
@@branimirvidenov1779 Maybe I will offer is separately in the future :)
Du hast einen Delay von 116ms eingestellt. hat das einen genauen Grund? Ich versuche diese Strategie in mein EA Framework einzubauen und frage mich, mit welchem Delay diese Strategie maximal arbeiten kann..
Nein ich glaube das war so standardmäßig hinterlegt bei mir ;)
Why not use a file link ?🥴 why complicate things?
I want to test it on synthesis index using deriv brokers. Want to test it on Volatilities 75. smallest lot size is 0.001, help me with the default settings
thank you very much😃
Hey Rene, I followed along in this video (awesome video, thank you very much) and my code runs perfectly. However, when I test it the profit is less than if I test it with your source code. Did you make any noticeable changes in your source code that you posted in the comments? Thanks!
Hey, no I do not think I changed the code here. But the testing results depend on many factors. If you use a different broker for example you will get different results.
@ also, does the high and low constantly update to the most recent high and low? (The high or low needs 5 candles before and after to be considered valid right?)
@@fulkrumfx you can define the expiration period of the orders. If you enter a small value (like 1) it will always take the last high/low.
@ I’m currently using default settings. Right now do you have an order on EU for a buy at 0.98726 (I would just like to make sure that it’s functioning as intended using the default settings). I’m running the EA on a demo too 🙌🏻 thanks for answering the questions!
@@fulkrumfx bro I am sorry but I don't even run the program :O
Great Content. I copied the code and paste it on Metaeditor 5. When I pressed run, It did not work. It says that have 42 errors. Can anyone help me
good stuff!