Expert Advisors and Automated Trading - page 63

Hey all, hopefully the subject is clear enough, but nonetheless I will try to explain the best I can. I've written a EA to trade my custom strategy, and when testing it on a whole year (without visualization) iv'e noticed that there are some weird entries one after another that should not be
Is there a way to detect the tester is on math calculations mode ? i'm using OnTester anyway for custom max with normal optimization , so i'd like to run the "evaluation" function if on tester detects math calculations mode
//+------------------------------------------------------------------+ //| SpikeDetector.mq5 | //| Copyright 2022, MetaQuotes Software Corp. | //| https://www.mql5.com |
Hello everyone. I am building an EA based on RSI. I have followed a YouTube video on how to do it, and I did it exactly as the video, but I'm still getting errors. I will share the line of code, can anyone possible tell me what I'm doing wrong? Thanks in advance
Hi everyone, How to close all positions instantly, without using the Sleep function as in the following code pls ? bool CloseAllPositions(){ int total = PositionsTotal (); for ( int i = total - 1 ; i >= 0 ; i--){ ulong positionTicket = PositionGetTicket (i); PositionSelectByTicket
This example is provided in build 3980: https://www.mql5.com/en/forum/454439 The iris.onnx model is generated through this python code: from sys import argv from skl2onnx import convert_sklearn from skl2onnx.common.data_types import FloatTensorType from sklearn.datasets import load_iris from
  i can help!  (10)
How do I make an EA from an elephant bar setup? and how can i handle the candle size issue? for example consider a 100p or 50p elephant bar vary depending on the chart I am using
Hi, I have an MQ4 indicator that formats date and time like this: 26.10.2023 - 09:11:45 using this code: // This will take broker time and turn it into format DD.MM.YYY string GetTime( datetime when= 0 ) { if ( when== 0 ) when= TimeCurrent (); return StringFormat ( "%02d.%02d.%04d -
  Best EA for Gold  (1)
Hello, what are the best Expert Advisors for XAUUSD that match this criteria? No Martingale No Grid No Averaging No Dangerous Methods of Money Management regards, Matt
Hello recently i found out someone renamed my ex4 and ex5 he/she removed my order send comment and copyright i don't know how this they managed to do thisi am thinking that my file had been decompiled or i dont know how else someone was able to remove my copyright and order send comment
Dear all, I am developing some experts in MQL5 and am running back tests on them. To make things faster, I also develop Power Shell (7) scripts which run tests in a non-interactive fashion, varying various trading parameters, including the leverage. I noticed that scripts sometimes give unexpected
Hi, After updating to build 4040 I'm experiencing problems with optimizations: my local agents (the threads of my PC) fail without any apparent reason. When this happens, the optimizations starts being much slower and the results are all zeros. I attached a screenshot of the Strategy Tester window
Hey gang, I've been at this one for a couple hours with no success yet. I've tried 2 brokers so far with the EA I'm porting over from MT4. One works fine, and on OspreyFX I get a retcode error 10030: Invalid order filling type. Print (" ORDER_FILLING_FOK =" + ( string )IsFillingTypeAllowed( _Symbol
I wanted to change AI's so after changing expert advisors I received a remark failed Trade is disabled and the new AI doesn't work. what can I do to change this
i create dialog and button UI, But cant Action after Click On Test Button BT10. Cant Print "Button Pressed" NewProject.mq5 #include <Trade\Trade.mqh> #include <GraphicalPanel.mqh> CTrade trade; CGraphicalPanel panel; int OnInit () { if (!panel.Oninit()){ return INIT_FAILED ;} return (
I'm currently learning how to apply moving average with indicators values. For example, in below code I am trying to have moving average data for Heiken Ashi indicator value. //+------------------------------------------------------------------+ //|Variable Initializer
hi, trading hours are not working, not sure if my news filter is working either. Does anyone want to check it for errors. just have to say that I am completely new to mql5 coding. THANKS
Hi, I want to store symbol name and symbol volume into an array. I found that array function ArrayFill can't be used on string data type, the only option that I found is using CArrayString. This is the first time that I used this library and this is the code that I tried to used to store 1 symbol
Hi all, purchased a pattern scanner and market structure breakout scanner on mql5. I've been using it for sometime now however, majority of the very good signals the scanners give have been missed. The scanner are mt5 based and they send me signals via mt5 terminal. Is there anyway to automate the
Hello community. I am currently coding an ea which will allow me to know if the market base line of the TDI indicator (trading dynamic index) which is an exponential moving average is inclined downwards or upwards. In my research I saw that I could use the slope which, if positive, means that the
Good day. I'm having an EA which is working very well without any problem but whenever I upload it to the market it always says Not validated and I don't understand why cause it has no errors. Can anyone maybe help me pass the validation 🙏. Thanks in advance
I have a trading algorithm set up with the MT5 python system and I noticed that it doesn't consistently execute trades as it should. I don't get any error messages, and if I re-run the algorithm again it will sometimes execute the exact same trade that didn't previously execute. No variables are
I've learned mql5 iteratively as I've been building my system. In the process, gotten better about abstraction, functional/oop design, using structures and arrays, reusing vars, constants, etc. My issue now is optimizing my code. It runs fine live since single thread performance isn't that big of a
When you close a trade partial, you see it get a comment "from # ticketnumber" and in the order history it get the comment "to # ticketnumber" When i want to code 3 partial close areas for a trade, then i need to count how often i have already close partial from the first trade, but i am looking for
for ( int i = PositionsTotal () - 1 ; i >= 0 ; i--) { ulong ticket = PositionGetTicket (i); if ( PositionSelectByTicket (ticket)) { pos.Side = ( ENUM_POSITION_TYPE ) PositionGetInteger ( POSITION_TYPE ); ENUM_POSITION_TYPE side = ( ENUM_POSITION_TYPE )
I have made an ea with my conditions and it cannot open a trade. Who can assist me
  Help With My EA  (5)
I keep getting this no money(error 134) Error when the strategy tester tries to Test the Ea on 1m timeframe ? test on EURUSD,H1 (netting) strategy tester report 21 total trades test on XAUUSD,D1 (netting) strategy tester report 16 total trades test on GBPUSD,M30 (netting) strategy tester report 9
Hi all, My goal is to write a simple EA that cancels pending buy stops or sell stops whenever current price moves past original stop price. The EA - code attached below - works flawlessly for test sell stops (commented code for test sell stop). Yet, for test buy stops, the EA cancels pending order
[Deleted]
  EA Freezes  (3)
Sometime EA Freezes and there is no error. My EA runs on OnTimer I keep printing TimeLocal() on timer on comment but it also freezes How can i find the reason of Deinit or freeze? all works fine when I restart EA
Hello everyone I cannot get this thing to work. I am trying to read a moving average buffer from a downloaded indicator (AllAverages_v4.9_MT5), and want to read a few values to calculate entry (eg close above MA for a buy). I'll attach the indi file and paste my EA code. #include <Trade\Trade.mqh>