Expert Advisors and Automated Trading - page 238

Hello everyone, Ever since build 2345, I have not been able to use the optimizer with my EA. The tester works fine, but if I select "Slow complete algo" or "All Symbol in Market Watch" there is no trading at all. I finally got around to explore why that was the case. And after some troubleshooting
I've been using resources for a long time in mql4/5 programs, but lately I've realized I keep getting the 4802 error for all new programs, surprisingly old programs still work correctly. At a point I had to copy paste the code from an old program to a new one, and while the issue didn't occur in the
Hi,I got EA that sends me email alerts and executes external exe/bat file via code when TP/SL is reached. So alerts are not triggered thru alerts created in Alerts tab because it has to be created manually. Problem is that mail sending is not reliable on my VPS. I was told reason is VPS is slow/ 1
Hello! I'm just wondering if anyone had the same problem... I would like to know what is wrong: script or backtest:p Well, i have written a simple bool for trading: bool buy_pb = velas[1].close >= velas[1].open && velas[2].open >
Hi All, Can anyone here please tell me why the PositionSelect() function is returning false when I create 2 open positions(1 Buy and 1 Sell) for the same SYMBOL.. My objective is to manage each position's profit individually. I am unable to do so as the function PositionSelect() is returning
Hi, I want to come back to hedging mode, what should I do
I want to write a code (for an advisor) which closes all open trades at the end of the trading day. So for example if the market for US stocks closes at 16:30, all open APPLE orders must be sold at something like 16:29. I tried to look this up on the internet but I couldn't find any specific answers...
My EA sends orders with this line which is present only once in the entire code, so I am sure the error can't be elsewhere: orderTicket = OrderSend (Symbol(), orderChoice, orderSize, orderPrice, 2, 0, 0, NULL, 0, 0, CLR_NONE); Debugging with Print right above that line, I get this string: OrderSend
Hi all, I wrote a EA using the event OnTradeTransaction. While running my EA without optimization its works fine. If I run my EA with optimization enabled the OnTradeTransaction is not called. Someone know why? I'm using build 2345 Best regards, Fernando Ribeiro
My thought is like AC1 --> EA1 ( EUR/USD H1.....etc) AC2 --> EA2 (EUR/USD M5...etc) I've tried this before, and when I click to AC2 after setting up AC1, the EA1 will follow me into AC2
Hi can someone help me to solve this problem on meta4 I had an expert who worked on some graphs since he did not work well or removed the expert and then deleted the graphs but I see that he continues to open positions as possible? can someone help me thanks
Hi there all I'm looking for a way i can use my lot Size with 0.1, I tried using the code below it works but I'm not satisfied with it. Below $100 it wont trade at all. I want my Lot size to trade in 0.1's. When i change the "riskpercent" to 0.1 it's risky but will trade below $100, i don't want
Hi, is it possible to resolve own ENUM's in the exported data of backtests/opimizations? Now it will be exported the INT values. BR BTW: I use MT5 with Linux (Wine)
Can you please help i keep running into this problem and cannot overcome it? declaration of 'm_position' hides global variable supersbbstops.2.mq5 1009 25 see previous declaration of 'm_position' supersbbstops.2.mq5 9 16 declaration of 'm_trade' hides global variable
Hi All. I need help with this EA. I got it form another forum om MQL and have been playing around with it, but for some reason i cant figure out make it work like i want. It uses a short and long period ma, and the idea is that it opens orders once price crosses the shorter MA. It has a lot of extra
Hello I am new to developing EAs I am developing an EA that Has Sort of Martingale in it so sometimes it goes to high drawdowns in equity but most of the times eventually close in profit after looking at the test report i cannot figure what is the minimum balance needed for the ea to run smoothly...
MT5 strategy tester shows a max of 10,496 steps, yet some times it doesn't even make it to that number when testing and sometimes it will go beyond but it NEVER tests exactly ALL the inputs steps. Does anyone know of something that will test exactly ALL the input step settings of your EA
I wanted to incorporate trading at certain times in a different way into my EA and was wondering if possible I could change the timeframe and settings my EA works on depending on the time? Thanks :)
Hello, Anyone can help me on solving the the warning message of "Posible loss of data due to type conversion" on the lines highlighted below: void updateVolume(){ long OneDay=60*60*24; datetime
can someone help me to add time filter in my ea
Hi, I'm new to programming in MQL5 (and programming in general). I'm currently writing an expert advisor, and I need it to open multiple positions at once for the purpose of scaling out and adjusting positions. My MT5 is in hedging mode. I've figured out how to use cTrade to open positions. But what
hi, I'm new for ea coding, and trying to learn from internet, but I cannot find out how to solve my problem. I want to change time frame on my ea 2 times but it's like keep looping when I run it, Could someone help please? thank you in advance. int OnInit() {//---
my ea sometimes does not start trading. After a while it return to normal.I suspect vps hosting. there may be a disconnection problem. How can I find out whether the mt4 program has been restarted or the vps hosting has been restarted. why this may be the problem
Hello I have the attached indicator which sends alerts in case the candle closed above/below a certain price. As a first step, i would like to create an EA that opens a position based on that alert. What i want to achieve is to make the EA that finds the high and low during the Asian session and
  Magic Number  (2)
Hi, I use an EA with Magic Number stand alone, so I can use the same magic number for all the instruments. I know if I put an order manually its Magic is 0, but can I use 0 in EA ? So if I openn manually, the EA can manage also my order? Thk
Hi traders, I'm looking for EA that closes a open trade when the market breaks a price (added manually) based on h4 candles, do you know something like that? thank you very much
  Normalize Price?  (6)
Hey guys, can someone explain me the idea behind this code? double NormalizePrice(double p){ double ts=SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE); return(MathRound(p/ts)*ts);} Can it not be simply replaced with this? NormalizeDouble(value, Digits()) Help very much appreciated
  iFractals MQL5  (6)
god i hate MQL5 everything is complicated compare to MQL4 anyway guys i tried the sample of ifractals here is the code double fractal_up[],fractal_down[]; //--- for collecting fractal data handle_fractal = iFractals(_Symbol, PERIOD_CURRENT); ArraySetAsSeries (fractal_up, true); ArraySetAsSeries
Hi everyone, how can I properly check if the following code returns correct price value ObjectGetDouble ( ChartID (), "Line" , OBJPROP_PRICE , 0 ); other than checking if it is bigger 0? Thanks
Hii am working to build my expert and want to Hide input tab window from users , while all variable parameter are active in hidden ? thank you