Expert Advisors and Automated Trading - page 76

Hi, I am still quite new to MQL5 programming and I am stuck writing the code for a grid EA. Basically, I want the EA to do the following: Step 1. If there are no open positions and pending orders, the EA should call the OpenNewTrade() function Step 2. While there are open positions or pending
Hi, I’m trying to convert this function from mt4 to mt5 but I'm not sure how as I'm not familiar with mql5 code yet. Any help would be appreciated. double GetFunction() { int j,k; double sumw = (Period1+ 1 ); double sum = sumw* Close[ 1 ]; for (j= 1 , k=Period1; j<Period1; j++,k--) {
Hi, I been struggling for some evenings now trying to get the proffit/loss from the last closed order and have tried alot of different codes. When a run my Strategy Tester it feels like it misses orders? and i read somewhere that you can use it in Tick() or in Trade() function?? Should not this be
  Strategy Tester Report not found  (166   1 2 3 4 5 ... 16 17)
I get the message " Strategy Tester Report not found" EURUSD 1H. How can I solve this
When a visual test is started on mt5 strategy tester, the window pops up and there is a main chart which using whatever template is saved as tester.tpl, then other charts of the different timeframes that the EA is simultaneously working on. How can I from my EA, manage this other basic charts, maybe
Is there a way to get the MQl5.com user name if the user logged in via MT5
I'm not familiar to C# coding
  MT5 ... SWAP  (11   1 2)
Why is there a SWAP column in strategy tester under deals with no entries ... when trades HAVE carried overnight
I got several computers here, let me list them down: PC-R = AMD Ryzen 9 5950X 16C32T PC-5 = Intel Core i5-10400 6C12T PC-9 = Intel Core i9-10900F 10C20T The situation is, PC-R can add PC-5 and PC-9 to its Local Network Farm PC-5 can only add PC-9 to its Local Network Farm PC-9 can only add PC-5 to
  Strategy Tester  (15   1 2)
Is there a way to test all time frames in one run, that out puts all results per time frame?
Hi, I wan to ask about buy and sell or entry price. I've heard about the word 'buy at the ask and sell at the bid' but there's no one talking about spread. Using the code below I want to know which one is correct between adding spread or not. void OnStart () { int distance = 100 ; double entry
Good day everyone. I want to use freelance to make an EA But I want to ask if the idea will work before I post it. [broker] has different volatility index with different minimum lot size. Is it possible to make an EA and have all the volatility index with the options to choose lot size for each
Is it possible to get a huge slippage during strategy testing? I've been testing an EA on M5 XAUUSD chart and found that the test account was stopped out due to a huge slippage. The stop loss level was about 160 pips, but the filled price was about 1080 pips, which was about 7 times the SL distance
Hi Everyone, I'm developing my EA. The thing is that I want to make only one trade each time. How can I check If the current trade is open in order to avoid the enterTrade functionality while it is opened? And also I've noticed that I had some problems related to "failed market sell 0.1 XAUEUR sl
Hello guys! I created that topic because I am having some issues trying to set an expiration date in my orders. I am using the MT5 Python API, and that´s the structure: request = { 'action': mt5.TRADE_ACTION_PENDING , 'symbol': [stock symbol], 'price': [price] , 'sl'
Hi - is it possible to add more than 1 MQL5 signals to the same MT4 account? If yes, please provide some tips, pls. And can you trade say 90% of the account funds with one signal and say 40% with the other signal? Thanks
anyone can make a Simple EA from this alert indicator and when it alerts to place the order? based on alert message notification
Hello, I'm trying to verify the settings of the Options > Signals tab via MQL5. Is there a way to do it? The signal subscription keep disconnecting and I need to monitor that. Thanks
wanted : encrypt a string using AES256 method, format the encrypted data into hexadecimal string, then decrypt it again using same key into the original string. here's my try uchar src[], dst[], key[]; string Original_text = "bla bla bla" ; string SKey = "012345678901234567890123456789AB" ; string
Having trouble to opening sell trade on all currency that the second currency is JPY (AUDJPY, NZDJPY, etc). I've check stop level I've check freeze level I've check calculated lot against min lot I've check stoploss price above open price and take profit price I've check take profit price below open
I have my reporting logs and I sometimes see something like Sell ticket = 2303414370 request.price = 1.07751 request.volume = 0.16 type = 1 iRes = 1 price = 1.07747 volume = 0.16 is TRUE MyComment = EURUSD_40117263422_S My_error: 4756 Trade request sending failed The command 'Sell' appears to have
Hello, I'm subscribed via the terminal to a Signal. Its showing un the navigator under my account. However, when running the following in my EA I'm always getting 0: Print(SignalInfoGetInteger(SIGNAL_INFO_ID)); Any idea why? This is essentially the only code in the EA. Thanks
I have create this RSI EA with MA as a filter but wont take trade is there any one can help help check the code below //+------------------------------------------------------------------+ //| RSI.mq5 | //|
the EA runs on my laptop (after i reinstall MT5 with the latest version) but the VPS is not able to run it, keeps showing failed with code 1 and remove the EA it was fine before. can anyone help me
I was using an EA perfectly fine before the latest mt update about 3 weeks ago and now it keeps giving me a "failed with code -1" error. Nobody else in my telegram group seems to have this issue so I don't know what's going on. I've tried reinstalling mt5 twice now but still nothing. Any
I have a few indicators I use often. I would like them to appear right under the " Insert ->indicators" menu in MT5 I notice when I go to Insert -> Indicators on the MT5 menu, there are 5 indicators, that I never use, then, other indicators in the submenus, and sub-sub menus. I tried to see if this
  Backtesting Issue...  (42   1 2 3 4 5)
Hi, I'm encountering a data loading issue when trying to backtest on UK100 symbol. The errors log from the journal is shown below. Looks like the error is "Cannot add tick event (events' array size is 35782656)" I also encounter the same problem when trying another broker account. Any ideas what is
Hello, I'm doing in Strategy Tester a lot of backtesting in "Fast genetic based algorithm". I'm looking for a way that once finish the backtesting, to automatically "Start" again. It could be possible to be done with Metatrader 5 Running from the Command Line? to create a .bat file with the command
I've been trading a few years for myself, I have some success for a few months then fall into same old traps of chasing, FOMO, hanging on, basically discipline! So wasting a lot of time trying to get it right! I would like to try a few EA's that can stick to the rules! But where do you start looking
I am trying to get the value of a trend line drawn by the user on the chart. Any ideas? I can't figure out a proper way to draw a trend line since there is so much personal intuition on what a pivot point would be considered. Is there a way to get the value of the trend line so I can use it to code