Expert Advisors and Automated Trading - page 92

I have really struggled to find any information to help me resolve my issue, so am hoping someone on the forum can. I have written an MQL5 script to create custom symbols and load tick data into them from csv files. int numTicksLoaded = CustomTicksReplace ( "AUDNZD_T_SVS"
Hi all -- is there a straightforward way to find out the name of a class during run-time? I hoped MQL would have some predefined macro akin to __FILE__ or __FUNCTION__ but, alas, there is no __CLASS__... Predefined Macro Substitutions - Named Constants - Constants, Enumerations and Structures - MQL5
Hi, is there an EA out there that will move my SL to BE when TP1 has been hit and then SL to TP1 when TP2 has been reached etc. Thanks
There is a EA that i downloaded from MQl5. I changed some settings and added 2 inicators to it, it seems very profitable now. Can someone rescripts that Ea with the new indicators added
Hello, is there something like this? Whenever i open a trade and set my stop loss, i want it to be fix so that i cannot change it. It would psychologically help me, so that i am not even tempted to change it and increase losses... thanks your your help
Hi everyone, I am a beginning EA creator and trying to figure out the very basics of creating an EA with MQL5/python. To start off, my EA should place an order when dragging it on the graph and close the trade if it did not hit the SL or TP within 10 seconds (keep in mind I just built this EA for
Hi im new here. first of all, just wanted to say thanks to this comunity, youve allready helped me a lot from just reading passed thread. is there a way to gather data, like any variable inside my code, from each pass and then output it to the result table, or at least print it on the journal with
Hello, With this code: request = { "action" : MetaTrader5. TRADE_ACTION_PENDING , "symbol" : "BTCUSD", "volume" : 0.01, "type" : mt5.ORDER_TYPE_BUY, "price" : round (price, 3 ), "type_filling" : MetaTrader5. ORDER_FILLING_RETURN
[Deleted]
Hello I have the following code of which am expecting that on BUY ORDER its sets the SL and TP according to the ASK price and on SELL its sets SL AND TP according to BID PRICE. Everytime i run the bot is report INVALID stops //define Ask, Bid Ask = NormalizeDouble ( SymbolInfoDouble ( _Symbol
hi I don't know much about mql5, but need help on how to approach this. I whant to make a deep learning EA, that has; 1º The first inputs ohlc 2º Theese inputs are used as inputs in all the oscilators, indicatos 3º The outputs of 2º) are used as the input layer of the deep learnig ... and so on as
Hello I have written a trading program in mql5 I want to know why it is not compiling please I would appreciate if a person can tell me the problem with it I wrote a trading program but it's not compiling , can you help me check it to see the errors and let me niw why it's not compiling , if
Hello, I would like to have an OBV Indicator that I can choose to add or remove from OBV based not only in close price but also be able to change it to open, high and low. Does anyone have this modified indicator that could share or even help me out on changing the attached code? Thanks in advance
[Deleted]
There is a way in MT5 to apply the optimized parameters/inputs to the expert advisor and then save it as a set file or do I need to set them manually one by one
[Deleted]
double Buffer[][], handle[][]; if ( CopyBuffer (handle[][], 0 , 0 , 1 ,Buffer)==- 1 ) Print ( "Failed to Copybuffer " , GetLastError ()); If i have 2d or 3d array how do i copy buffer to it Note : above code wont compile, its for reference what i am trying to do
Hey guys, wondering if anyone has any clue how to integrate the LR Correlation statistic into the ontester using CTradeStatistics. Here's my code: //+------------------------------------------------------------------+ //| macdrsiadx.mq5 | //|
[Deleted]
  OpenCL  (12   1 2)
Can any one coding OpenCL to any EA ?I pay money for it
Hey guys I am debugging my MQL5 source code . What does the file , function and line block indicate
Someone had the experience to try to move object and it not obey and return success? The follow expert do not move the lines... how to report a bug to metaquotes? HLineCreate and HLineMove has been based on the documentation page of OBJ_HLINE . Metatrader version is from april 4 2023. string ativo=
Hi, I'm using MT5 terminal build 1730 64-bit. I'm running EA in strategy tester (visual mode). This EA has panel with buttons BUY and SELL for manual trading. Why buttons aren't changing state (pressed or not) when I'm clicking it during testing as it works in MT4?
Hi All, I've been trying to open a chart and then plot a moving average from inside a script. This is my simple code: void OnStart () { long _chart = ChartOpen ( "AUDUSD.a" , PERIOD_H1 ); int _myMA= iMA ( Symbol (), PERIOD_H1 , 21 , 0 , MODE_SMA , PRICE_CLOSE ); ChartIndicatorAdd (_chart, 0
hello friends, can anyone help me to solve my problem? I've made an ea using an ea generator and the ea is ready, but when I backtest it in Metatrader, why doesn't it work? please enlighten me
  Help with an ea  (1)
import MetaTrader5 as mt5 from datetime import datetime , time, timedelta # connect to MetaTrader 5 if not mt5.initialize(): print("initialize() failed") mt5.shutdown() exit() # set up the trade parameters symbol = "GBPJPY" lot_size = 1 stop_loss_pips = 20 # switch to the daily timeframe
//+------------------------------------------------------------------+ //| Expert.mq5| //| Copyright 2023, MetaQuotes Ltd.| //| https://www.mql5.com|
Hi, I am trying to debug a very simple program in mql5. In the journal tab I get the message that the start time has changed to ........., which is about three days after when the data actually starts from. I have outputted alot of the variables to the journal tab so that I can see what is what
Using a hedge as a stop is a strategy I have been using to manage risk on swing trades. Is it possible to set trailing stops on an order? When I have tried placing a stop order , choosing a stop loss, I can't make it become trailing. I have seen other threads about missing a trailing stop. But
  Discord API  (1)
Hi, i would like to develop a EA which communicate via Discord. Are there any Discord API / Documentation for MQL5
  Tick history missing  (12   1 2)
Hi, was testing this code: #define FAIL (-1) #define AS ArraySize #define PF PrintFormat #define TTS TimeToString datetime test = D'2021.09.06 00:00:00' ; MqlTick ttt[]; if ( FAIL != ( CopyTicks ( _Symbol ,ttt, COPY_TICKS_ALL ,test* 1000 , 10000 )) ){ for ( int i= 0 ; AS(ttt)>i; i++){
I've read the documentation and I understand you need to select a symbol using the Name method in order to use any of the functions of CSymbolInfo. What I don't understand is how to do that. Every function in the documentation says: When I click on that all I get is: Sorry if this is an obvious
Hello, I can't run Test Strategy on any Expert, error: "optimization max" criterion not started, no Ontester function in....." (any expert) which is not possible. anybody know why and how to fix this? it use the work and stopped. MT5, TY :)
This has been driving me crazy, so I finally ground through and figured out exactly what is going on. In the MQL5 wizard, if MA or PSAR trailing stop is selected, it doesn't work correctly (an otherwise profitable strategy becomes unprofitable) if the initial stop loss is set to anything other than