Expert Advisors and Automated Trading - page 25

Can you help me? This is all my code: double ma5[]; int ma5_handle= 0 ; int OnInit () { EventSetTimer ( 10 ); return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason) { EventKillTimer (); } void OnTimer () { string symbol= _Symbol ; ENUM_TIMEFRAMES period= PERIOD_CURRENT ;
bool GetSymbolInfoDouble( const string symbol, ENUM_SYMBOL_INFO_DOUBLE property, double &result){ if ( SymbolInfoDouble (symbol, property, result)) { return true ; } else { Print ( "Failed to retrieve symbol information for: " , EnumToString
  TradeCopier  (3)
Hello! I made a EA which copies trades between two terminals. It is all working fine but I am facing an issue. There is a difference of price for the same pair, between the two brokers. For SL and TP I send the price across, but if there is a diference in prices, then the distance between open price
I wanted to post as a seller an EA that acts as a manager. It does not open any transactions and only assists the trader in opening transactions. I sent the file before publishing to the market for verification and after verification I received an error that my robot does not open trades. Of course
Hey guys Battling with a bit of over trading so looking for a code to keep my fingers off the buy and sell button Looking for a code for Meta trader 5 that allows me to do one trade a day and/or allows me 5% risk of my account (if possible) then freezes me out in until the next day at 8:am. Happy to
Hi, a couple of days ago my Backtester suddenly stopped running and the expected running time just keeps on adding up. At first I thought it was code issue, but tested with other running code and also does not run. I do not see any issues with my account, as was the case with a previous post from
Why can I not select the Cloud agent to use and when I try to run the strategy it always defaults to a local core? Any link to documentation about this would be helpful
ENGLISH: I have a problem when trying to optimize . Before everything worked fine, but for a few weeks now, when I try to optimize an EA (my own) my PC freezes , the optimization does not continue (or takes a long time to advance because the CPU stops being used) and it is unusable (I am not
Hi, Ive made an EA that uses custom indicators and CTrade class. The problem is that the EA doesnt take all entries decpite the entry conditions being met and the entire 'trade' code block being run. Heres the code: //+------------------------------------------------------------------+ //|
Hello, get a warning "implicit conversion from 'string' to 'string'" string to number Ok number to string OK but "string to string" is complete new, i have no idea where is should start... int GetHistoryCloseTime(){ uint TotalNumberofDeals= HistoryDealsTotal (); ulong ticket= 0 ; string
i think after the new metatrader 5 update ,a new problem emerged for me : 2024.09.04 22:56:20.729 Core 04 pass 8 tested with error "no memory for ticks generating" in 0:00:00.036-after this if I don't close the mt5 I will encounter black screen. and changing data ,broker , timeframe , and robot
I have range breakout EA work very well but i have error with symbol GER30 index, The EA some times work well with this symbol but some times send very huge volume size like 1800 lots and i got error invalid volume, I need help. //+------------------------------------------------------------------+
Hi All, New to MT5, I need help retrieving the timestamp during which settlement period(The 1 hour period during which trading is closed) starts and end for xauusd. And need to retrieve using MQL5. Any help appreciate. Thanks in advance
Hi, I have a problem calculating the lot size on different symbols . In this case I present the example between the symbol US500 and USDNOK. The target risk is 0.5% of the account balance. US500 meets that risk, but USDNOK it's risking 0.05% on my tests. US500 information: Tick Size: 0.01 Tick
Hello, See the results of a Strategy testing below: If we consider Order number 2 for instance (of type "sell", and direction "in", executed at 14:00:00), how do I know to which "Out" order it is attached ?I mean, this "In" order is at some point closed by a sell position with a direction "out"
Hi there, Probably a really simple way but is there anyway to extract the result data from backtesting in MT5 into excel? I have backtested an EA over 2 years and have over 100 trades. I want to extract the buy and sell price of those trades to analysis. Any help would be much appreciated. Cheers
Hello everyone, I am currently working intensively on developing Expert Advisors and keep encountering a major issue: The Strategy Tester does not seem to take past news events into account . This results in backtests that do not reflect real market conditions, especially for strategies that are
  Open Files during backtest  (15   1 2)
Hello, when i place a file into folder files i can open this file when running or debug my expert. But when i run the backtest, the file is not found. Ok, after some research, i found the property tester_file. When i add this to my code: #property  tester_file...
There are some symbols with lots of corrupted data for historical ticks, which are badly plotted and computed in the tester with " real tick " modeling (many entry points are plotted far outside the market values). For the simpler " every tick " one, the graphics look normal, but I have low
I am fetching news from http://nfs.faireconomy.media/ff_calendar_thisweek.xml and it save the file inside terminal/MQL4\Files as FFCPing(Symbol)-ffcal_week_this.xml (eg, FFCPingGBPUSD-ffcal_week_this.xml). Code is reading news from that source and works fine for mt4. when i use same code on mt5 it
  Gold trading EA  (1)
Hello everyone, and merry Christmas to those who celebrate it. I just have a general question about two trading bots: The "name removed" and "name removed". What experiences do you have with these two tools? Are they positive? Would you recommend buying them, or are there other better ones? Because
My application is built using the standard library, but when I move it to a different location, the caption's position becomes misaligned. How can I resolve this issue
Hi everyone, I've been encountering several issues when working with the MetaTrader 5 (MT5) Python API related to account login and server management. I wanted to share my observations and see if anyone has experienced similar problems or found solutions. Here's a detailed breakdown: 1. Timeout when
Hello! I'm trying to upload the robot to the marketplace but I get this message : tester takes too long time - what does it mean
HI.. good day to you all.. Am not sure if tis is possible is there a way to hide functions from source code.. .mq5 or mq4 eg. void TrailingStop() { //Trailing code } or instead calling it from a private website codes.. eg. void TrailingStop() { //get Trailing code function from my website
Hello using this code everything appears fine but the order comment from the string TradeComment is not shown at all any idea what could be wrong ?? // variables string DayStart = "00:00" ; // Day Start Time double LastClosed_Profit; // Last Closed trade profit string TradeSymbol, TradeType
Hello, can someone help me with my code please. It is not taking trades on live account. Please can you tell me what is wrong with it. Thanks in advance //+------------------------------------------------------------------+ //| Trading Bot Configuration | //|
Hi, community! I have developed two custom indicators in MQL5: a currency strength indicator and an RSI indicator. I would like to integrate them with a Python tool so that, whenever I start my Python application, it directly receives real-time data from the indicators without saving it locally
Hello. The situation: I have multiple copies of the same EA running on multiple pairs. I made this work by changing the name and magic number of each EA. The effect being, each is distinct from the other. The issue: I thought the above would be enough to differentiate the trades made by each EA, but
I wonder how you manage  the Tick value in your code. For some Symbols it is in the deposit currency but for some Symbols it is in another currency. In my opinion it depends on the value of MARGINCALCMODE. If it is 0 (Forex) the Tick value is in the deposit currency. If the MARGINCALCMODE is 1 (CFD)...