Expert Advisors and Automated Trading - page 40

  MQL5  (4)
Why I can't get total order history data with code HistoryOrdersTotal() and HistoryDealsTotal() in mql5
Hello i have 4 EAs,Testing in strategy tester in MT5,When i test EA with my broker data it is not same with tick data not same result,But when i run EAs in live account and when EAs will open positions,And after sometimes for example after 4 months,When i run strategy tester for same period 4 months
Well I am not a coder but i got some one here who coded me an EA which was working perfectly so far on demo. now when i used the same EA with same setting on another broker cent account my EA is not taking the trades as it was suppose to take. I have applied two EA on my account, one is to trades
Hello, I need to get the high and low price of RECTANGLE in my EA with below code. double price1 = ObjectGetDouble (chart[idx].ID,obj_name, OBJPROP_PRICE , 0 ); double price2 = ObjectGetDouble (chart[idx].ID,obj_name, OBJPROP_PRICE , 1 ); but I receive wrong prices as below
Hi, My custom performance metric returns 0 value on journal tab but on backtester tab it returns inf, I'd like to ask in what scenario that the OnTester result in inf
I am a new learner of MQL5 and I want to do the following but I am not sure it is possible in MQL5: 1. Get the price of a sticker every time it has a new price (more or less get the "real time" price" or prices of the last two or three update). 2. Write an EA that runs/loops every time the price of
switch (x) { case 1 to 4 : g= 1 ; break ; case 5 to 7 : g= 2 ; break; . . . } not working even case 1 - 4
Hi! I jad a running signal subscription on MQL5 before, but the new one didnt copy the first trade? Is there some kind of error log to understand why? Can it be because he traded „XAUUSD“ and the symbol with my broker is called „XAUSUSD+“? On the other hand the trades of the first signal traded as
  MQL VPS  (12   1 2)
So today I just connected my account with MQL VPS through MT4, it deactivate the Auto Trading and traffered the ea to the VPS. The VPS is currently running one Ea but I have another Ea which i want to run in the same account but that ea requires DLL which is not allowed in MQL VPS. Will it be a
i use this code for calculating volume based on riskAmount and stop loss distance. this code works fine with forex trading but with gold it is not working properly. with gold the volume is always wrong it always give me 10 times the actual volume i need. double calculateVolumne ( double riskMoney
Hello, I have a question regarding the principle of drawing and profit per day, I would like if for example we reach 4% gain or if we reach 4% loss the EA does not open any trades until the next day how to do it thank you
Hey trader and programmer. Need your help. I have an EA that using DCA technique, which is open order more than one BUY/SELL at the same time. It works fine during real live trading. However, during backtesting in Strategy Tester of MT5, the EA only open 1 order, and it won't open new order until
I am trying to delete pending orders when I open a position on my chart. The problem is that if another strategy (same EA, different magic) on same symbol has an open order, the pending order will be deleted instantly. I am probably missing something, but cant find what. What I can understand, it is
Hi everyone, is there a function or simple already made code that would result in number of minutes instrument is traded in a day? Par example, UKOil is traded from 3:05 to 23:50 and forex pairs from 0:05 to 23:55. Regards
Hello everyone! I am making this EA that will essentially use correlations within pairs to make decisions. For my model to work I need to sort the data (skip the times that bars are generated on one pair and not in the other). I already had this "sorter" working so far and gave me not problems on
Hi, I've recently been looking to start trading with prop firms and I noticed that they usually ask that you send mq5 and ex5 files to get your EA's approved either before or after passing the challenges... Does anyone have experience navigating this because I've got many questions and concerns: 1
Hello, i am currently working on a expert advisor and i want to use a indicator which draws 2 trend line like a channel. the problem ist that i am unable to read these value with copy buffer. and now im asking if there is another way to read the values of theese two lines. im not that good in mql5
Hello, I am new in MQL5. I am trying to get the last three bars of EURUSD . As I am writing this post, it should return the last three bars, which were on 08.12.2023. But it returns the bars from 01.12.2023. What is wrong with my code? void lastBars() { // this array will hold the last 30 bars
this the code below, the rectangle showing but background color does not show ObjectCreate ( 0 , "RECTANGLE_LABEL" , OBJ_RECTANGLE , 0 , x, fromRange, x2, toRange); ObjectSetInteger ( 0 , "RECTANGLE_LABEL" , OBJPROP_COLOR , clrYellow ); ObjectSetInteger ( 0 , "RECTANGLE_LABEL" , OBJPROP_BGCOLOR
I have a nice EA and would like to add the function where an order will close when it gets to a specific profit (dollars). I am trying OrderProfit() but have no luck in getting the EA to respond. It's pretty simple. I want to enter a dollar amount into the EA settings, and when the profit reaches
Hi, thanks for all , I want to copy the historic buy and sell prices. what can I do for that? my respects to everyone
We have interfaces in MQL but they really don't provide much value than just using an abstract base class in my opinion. Interfaces become alive when you can inherit a class from multiple interfaces. interface IIsStringable { string ToString() const ; }; interface IIsWaitable { bool IsReady()
Hi All! Im having a problem using the strategy tester. After an update of mt5, the strategy tester is not respecting the stop loss or take profit anymore. (picture attached) The code is simple and it was working perfectly before. And it is working in real time in a demo account too. I tried...
The Balance/Equity graph in MT5 backtest report HMTL is wrong. Equity curve is missing in the generated HTML. The graph is correct in MT5 Client Terminal though. Please see the picture attached. First 2 shoe the client Terminal graph and the last one in the report HTML. Please help
Hello friends It seems new version of MQL5 have problem to get the value of Period, I have tried both " Period() , _Period " But the out come is wrong I write this simple code, and change time frame to check the result, But the out come is Wrong !!! I use MQL5 version 3030 int OnInit () {
Hello I use MSQL5 and metatrader5 When I change the Height of oscillator window by ChartSetInteger() function it works but after that I can't change the height by mouse the code is : for ( int w= 0 ;w<windows;w++) { int total= ChartIndicatorsTotal ( 0 ,w); //--- Go through all
i am creating a EA through meta editor using custom through expert advisor(generate) it work well in all script expect NAS100,when i attempted to add it on NAS100 chart it simply disable, somebody help
Does anyone know a way to detect a datatype from a string value? This can be important when reading from a CSV file, as we all know mql5 reads a csv file as a data of one type it, for example reading the information from a CSV as strings which works better and gives you the option to convert the
Hello, i have a doubt about something i can't find anywhere in the site. I currently have an EA running in MQL5 VPS. If i would like to purchase and launch another EA or a signals service, but would prefer to avoid messing up with the current EA running (in terms of risk, money management, etc...)
  OnnxRun failure  (5)
Hi community, I'll try to run my onnx model without any success. Here after are the steps : - I use OnnxCreateFromBuffer to create my handle from my model --> it's ok my handle is not invalid onnxModel= OnnxCreateFromBuffer (ExtModel1, ONNX_DEFAULT ); if (onnxModel== INVALID_HANDLE ) {