Expert Advisors and Automated Trading - page 2

To post a new topic, please log in or register
BULLISH/BEARISH Bar counter code Hi guys i`m having problem creating a bar counter code.Basically this indicator would be a statistical tool for me and it would help me very much with my market research. It would count how many  BEARISH bars appear and BULLISH bars at the next candle of certain time...
Hi, Since I updated to version 24 July 2020, when importing cache opt file, all parameters are missing, even I select enable all. When exporting to XML, the parameters are missing too. Please check it out. Thanks
Hi all, is there any way to access the built-in economic calendar during backtest? I tried CalendarValueHistory and while it does give proper results when executing the code on a live chart, it returns no results during backtest. Thank you in advance
Hi, I have an EA I developed and have used it for a lot of months in real time account, when it worked fine. Recently I decided to do some changes in the setups used and that lead to me to test it in the Demo account, something I normally didn't do before. And now, surprisingly, it is finishing
I'm trying to import an indicator value but I'm not getting it. The print on the indicator has the right value but when I pull the expert, only 0.0 appears //+------------------------------------------------------------------+ //| MHI.mq5 |
I am relying on the new MQL5's function WebRequest in order to consume a RESTful webservice from an EA, however I can't POST some JSON data this way: string headers;char result[];string signal = "{\"ea_id\": 1,\"symbol\": \"AUDUSD\",\"operation\": \"BUY\",\"value\": 0.9281}";StringToCharArray(signal...
Kind of taking a survey here. I've been reading around various area's on lot calculation. I'm wondering, how do you calculate lots? Here are some examples from a thread I posted on another forum: // a) Found this in a spreadsheet somewhere on what I've read so far...
Dear community, I am trying to program an Expert Advisor in Metatrader 5. A buy or sell trade is to be carried out on the basis of different indicators. I am currently having problems closing a trade and I am stuck. Can someone please give me a reminder? 1. it is successfully initialized 2. A trade
Hello, I am new in MQL coding, I am trying to calculate profit from an open price (set in an input variable), the code is below. The problem is OrderProfit() is returning a different value with my code. =================== //+------------------------------------------------------------------+ //|
Good day , Help with my EA. Before start trading everyday , I want my code to compare yesterday's AccountBalance to today's. If today's AccountBalance is greater than or equal to 5% than yesterday , then stop trading. Here's what I thought about it : if ( //AccountBalance is >= 5% than yesterday's
Hi. I'm using the mt5 vps and when im foing to upload my ea i need to attach the ea in a specific chart. I have multiples ea of the same current, EURUSD, but they all run in differents timeframes. Is there a way to put all the ea together and when i attach to a chart to upload, the ea will operate
I have included some built in indicators in my EA, but i don't want to show them on the chart, how to achieve that
Hi Folks! I was trying to use the command ChartScreenShot. I looked up the Docs, and downloaded the example code. https://www.mql5.com/en/docs/chart_operations/chartscreenshot When I executed the code, here is what I received as result. My problem is that according to the Documentation, the...
*** how can i only buy @ the close not when the candle is still forming? trade.Buy(1.00,NULL,Ask,Ask-2.5 , Ask+3.5,"buying"); ***
Hello, Bellow is the Sample EA code found on https://docs.mql4.com/chart_operations/chartxytotimeprice. Currently, Y axis numbers are descending as they follow the arrow upwards Can you please amend the code so that Y axis numbers are ascending as they follow the arrow...upwards. X axis is OK , Why
Hello Everyone, How can i manage slippage in mqltraderequest ? i am sending a sell request and i want to tell the expert advisor to pay attention if there is a pending order within a slippage. Is it the same as the deviation
hello every one I am new to mql5 but have good programming skills. I want to do the following: make all open buy positions with same tp i tried using the codes in the documentation but it is really hard and i cant find a way out. any help or advice will be highly appreciated
Hello, I use MT platform on my iPhone mobile phone. Is it possible to your MQL5 automated copy trading via my Mobile phone? Kind regards, Metin
I am working on this problem for several weeks now and I just can't find a proper way to solve it. I am looking for help. I want the following to happen: 1) Place 2 orders, n and n+1. n has a TP & SL level, n+1 has only SL level. SL levels are the same for both orders. 2) If SL is hit, fine. Both
Hello, I hope everyone is keeping safe and well. I have written an EA which uses Terminal global variables. What happens to these variables when you migrate the EA to a VPS with "migrate all" option? I am guessing the variables get copied to the VPS along with the Terminal. My question is if I
hello , first of all sorry for my english if i say something wrong. I have this trobule with this code where it suppose to move to BE after 20 pips profit (it does) and then after being in BE do a trailing stop with 50 pips. The problem appears after being moved to BE, the EA as i see tries to do
The MT5 backtest presents inconsistent and contradictory values when it is executed successively with exactly the same parameters and the same data set. The cache (added in newer versions) is possibly hiding flaws in the backtest procedure from the latest versions. The test set has 100 roles and
I am trying to calculate Lot Volume in mt5 based on risk% and stop loss based on ATR(14), also i need pip value for the current instrument. I am new to MT4/5 and C++, but i have managed to learn a lot and have managed to convert an MT4 Oscar indicator to work in MT5. 1. I have seen the code below
I'm using ShellExecuteW from shell32.dll: int value= ShellExecuteW(0, "open", "C:\test.bat", strParameters, "", 1); The batch file runs WEKA to make a prediction which seems to open but returns an error and quickly the console window closes. I want to capture the error from the console. I've tried
Hi guys, I'm starting to look into the MQL5 Indicators Market and I would like to implement them in my EAs. Can someone explain the procedure? Can I call them with iCustom? I didn't see any of them giving in the description the apropriate iCustom parameters to call the buffers. Some of them have
Hi, is there any way to get the Time Zone of a server? I have an EA that I want to use on 2 different brokers who operate in different time zones. I'd like it to only trade within a certain window of time each day, and would prefer to be able to set this time limit to my local time and have the EA
Hello, I have an expert advisor to get indicator data (bband, rsi, rvi, ...), write it in a file to import the indicator data in database. I have one EA by indicator, the goal of this is just to write data in file, and not to do display. It's work good manualy, but when i try to load this EA in
Hi there, I'm trying to implement a reversal close module into my new advisor. This is a multipair advisor and all the algorithm is working into this loop, where the value for _Symbol is 'SName': for ( int s= 0 ;s< SymbolsTotal ( true );s++){ string SName= SymbolName (s, true ); The code is
Hi everyone! I am using CTrade library to open a long position at the market price then get the order ticket number. The CTrade document says "Successful completion of the PositionOpen(...) method does not always mean successful execution of the trade operation.", so I want to check if the order is
Hi all, I am trying to use the the Python library MetaTrader5 to elaborate the data in Python and then send an order to the metatrader5. I am not able to send an order using the function order_send(). I always receive the retcode 10013. I am struggling with this problem for days. Could someone help