Expert Advisors and Automated Trading - page 34

Is it possible to convert two not very complex advisors from MT 4 to trading in the MT 5 terminal? Auto-translation applied by moderator
I have this code for saving tickets that are stored in an object of the CArrayLong class void Save( void ) { if (m_tester || m_optimization) return ; //--- string name = "" ; if (!GenerateFileName(name)) return ; if (m_basket.Total() == 0 ) { if ( FileIsExist (name))
hi guys i bought an EA which is not working on my VPS PC now. I am loggin into my mt5 account and also into the community account, but the EA does not appear. when i check the market and click on the EA, it just says renew...but i rent it last week for the duration of one month. how to solve this
i have two charts on the screen. both representing the same currency but different timeframes 15M and H1. below code i use to draw an arrow. works fine but problem it is getting drawn on M15 timeframe. i want to draw it on H1 timeframe. I believe the issue something to do with the chartId but
Good day. I would like to find out if there is a way to drag and move (or another way) ALL stop losses at once. For example if you have multiple trades open and want to move all the stop losses. Currently I drag all the stop losses to the new target, but would prefer a way to select all and move
Is the description for my freelance job here at MQL5 understandable? And what financial outlay should I plan for? Thank you for your feedback
Hi, I have a strategy and I optimize it for a better input parameter. Now I optimize + backtest + forward test, supposedly the result of OptimizeA parameter was the best in backtest but on forward test OptimizeB parameter was the best. While backtest shows best parameter on the historical price and
When analysing the GBPUSD chart with 1h bars, I noticed that the tick volume shown for each bar is higher than the tick volume you get through MQL. I expect those 3 to be the same: A) Tick volume for a 1h bar in the chart B) #ticks after we call CopyTicksRange with COPY_TICKS_ALL and `from_msc` and
Hi everyone, In the same I want to : - Buy Limit( BuyLimit ) - Buy Market ( Buy ) - Sell Limit ( BuyLimit ) - Sell Market ( SellLimit ) Would you recommend creating 4 instantiations of the CTrade class? To better manage the different methods and avoid confusion? What do you recommend? Best
[Deleted]
Hello Members I have created Custom Indicator for %b (BB,MFI &RSI) values which is working perfectly fine. Attached jpeg for the indicator chart. I have also create a CLASS to access this custom indicator values and when try to run it in Test EA, get "cannot load indicator 'Relative Strength Index'
  file  (7)
Hello geniuses I have a code that hedges a some of orders and stores them in a file. If the robot is removed from the chart, after restarting, the robot can read the hedges from the file, but if for any reason the Meta-trader program is closed, after restarting the robot, it will display all of
  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