Expert Advisors and Automated Trading - page 66

My ea doenst trade so i looked at journal and see this:trading has been enabled - hedging modehow can i fix this?
is there any difference between using MqlRates and using iCLose for example ? MqlRates i have to use array and copy rates to the array , where iClose can just enter the shift number of the bar and thats it or i am missing something here ? thanks
  Mql5 coding  (2)
Hi guysRecently I have decided to learn coding  MQL5 but I dont know where to start. Can anyone introduce me a reference for beginners? Any help would greatly be appreciated. 
Hi everyone, I am unable to correct these two errors when compiling. Can anyone please help me to solve these two errors, thanks. Also i am new to MQl5 programming (Still learning and practicing), here is my code i would appreciated if anyone can correct if there is any error with a bit of
//+------------------------------------------------------------------+ //| VolumeEA.mq5 | //| Copyright 2023, MetaQuotes Software Corp. | //| https://www.mql5.com |
This code is different from all of the other bots. If it works then send back but keep it and back test to see if this is a good strategy. I really tried to make this work so if anyone plz plz plzzz help me that would be amazing
  Daily Profit and Losses ?  (13   1 2)
Hi everyone 😊, I'm still a beginner in this fabulous language, would you have a simple example code or a link with which I could calculate the daily profit or loss please? I've done some research on the website but I often find MQL4 codes and not MQL5. Best Reguards, ZeroCafeine😊
SymbolInfoInteger(NULL,SYMBOL_SWAP_MODE) should only return values from 0 to 8, but with crypto pairs on a demo account I use to test code, it will return 9...? I'm not sure if this can give a clue as to what is causing this but the symbol names with this broker all have an extension, and for a
Hey there, is there a way to adjust the level of a drawn object? I would like to draw a rectangle, than many arrows. The rectangle should remain in the foreground though. Thank you very much in advance
Hello all, I am new to coding so please bare with me. I have my code compiled with no errors, but when I backtest it, no trades are bought or sold even though there are many instances where conditions are met during the test timframe. // Execute trade based on crossovers and RSI conditions if
I have been recently learning how to code in mql5 using tutorials on youtube but I have a problem with activating them on a live/demo account. I have compiled them with no errors and they work fine backtesting. I have purchased other EAs from 3rd party coders and they work fine on a live/demo
Hello guys.. have a little problem and need some help. I have this EA (drawdown protector) in one terminal and i trade through another but with the same credentials. According to research, it is supposed to work like this and when i reach the daily loss limit, the EA gets in the way and stop me to
Hi there, I tried to optimize my program in the strategy tester. But when i maximise on balance max its seems that the EA doesnt have random end results: It seems to max out at 12080 and 8890 with no passes in between. The EA uses stop loss and TP and minimum amount of trades per pass is 200. What
I have thought that there might be some function that can get me previous Bid or Ask price similar to the one that give OHLC value. But I could not see any such function.    Please let me know how I can get the previous values of the Bid or Ask?
I am trying to calculate lotsize for my EA - everything is fine except the commission per lot aspect. Does anyone have idea of how to obtain commission per lot in mql5? I have seen some EAs that developers are able to account for commission per lot for a symbol. Anyone there to help
I have written an expert advisor in MT4 and I want to convert it to MT5. Everything seems to work except I can't open or close any orders. I used the function from the MT5 reference library: //+------------------------------------------------------------------+ //| Expert initialization function
Hi all, I am trying to add elements (values of an indicator), tick by tick, to an array. I managed to do it with the following code but I imagine there is a more practical way without all of the shifting. And obviously the code below results in some lagging. #include <Arrays\ArrayDouble.mqh>
Hello everyone, I hope you're well. Do you know of a free utility or indicator that provides a history of spreads within a candle, or at least retrieves maximum and minimum values? If not, is it possible to record the largest and smallest spreads for each candle and save them in a table? Do you
[Deleted]
Hello people. I am just starting out to learn coding my EA and its been a week of thick studying how best i can code it. This EA trades 1M candle open and does not have a Stop loss, and i am well with that. Can anyone help me with the code or help me complete the script. I would be grateful 1. I
Is there any way to collect market close time so we can close positions before market closes? No matter general or specifically for each instrument, to prevent market gaps' affections. It is MQL5 question, however if you have any solution for MQL4 too, it would be double appreciated
I have this situation where I exit on a bar that even exceeds its high/low on the tester. (See picture for reference). M5 Timeframe. Here is the code on how I exit trades. I have been using it since a long time. Its just accumulation of codes i read here and inputs of my own preference. void
I want to backtest one indicator named StableFX. But when I try to run the test "0" buffer of the StableFX indicator is -134, for example, but 0 buffer pulled with iCustom() is -65 on the same date. So the value showed by indicator and value pulled by iCustom is always different. I checked
  API on MT5  (10)
Hi, After reading https://www.mql5.com/en/forum/218890 and the update https://www.metatrader5.com/en/news/2187 as I understand regarding APIs for MT5 offers: 1) Python Integration 2) Server API (for brokers, not end users) 3) Web Api ( some third parties). 1) Am I missing some other as this seems
  EA news problem  (1)
I need the values: - news date and time (USD) - news impact type (USD) from uses in EA in the code i used string date=values[1] string impact=values[8] but it gives me error illegal operation use void OnTick () { //--- codice Paese per EU (ISO 3166-1 Alpha-2) string EU_code= "US" ; //---
Hello! I'm having trouble with a simple index counter in loop. I have tried every way to get it to work. * I have moved this function out of the OnTick section and called it as a separate function from there. * I have tried to include the moments of data array changes based on indexes when the index
Hi, There is an indicator I want to use in my EA and i have changed some of the inputs i've put the inputs i want to use in the iCustom function but when I run the EA and click on the indicator used, some of the inputs are staying at the normal values and not the ones that I want to use. For
  Data for backtesting  (30   1 2 3)
Hi everyone, I use MT5. I've been trialling the use of tickstory and Tick Data Suite (TDS) for sourcing symbol data for better backtesting. My trading strategies are based on the close of M15 timeframe and above so I'm not looking at HFT, more swing trading. Based on this fact I'm planning on using
  MA in my EA Code  (1)
Dear Coders, Would you tell me the if statement if i want to only take buy positions when price is above certain MA and Vice versa ? thank you
Hi everyone, today out of the blue i thought i would try cloud optimisations and i've been getting some strange errors.. anyone had this happen before
Dear all, I appologize if I ask something banal, but I have an issue with Strategy Tester (ST) in Meta Trader 5 (MT5), constantly stealin the focus from other open windows. Here is my situation: I developed a number of Windows batch files which I use for backtesting of the experts I am developing