Expert Advisors and Automated Trading - page 146

Hey everyone, I recently attempted to backtest an expert using MT5 demo servers and experienced extremely profitable results. However, when I tried to use the historic data of my broker, FBS, I had 0% gain or loss on all pairs. I used the default settings and even raised the deposit load up to 70%
  MQL4 to MQL5  (2)
Hello, How can I write the following MQL4 condition to MQL5? if ( OrderSelect ((IT_E2565O - 1 ), 0 , 0 ) == true && OrderMagicNumber() == MagicNumber && OrderType() != OP_BUY && OrderType() != OP_SELL);
Hi, I'm using the macOS version of MT5. Hoping there's some way to install this EA while still using macOS (i.e., without having to use virtualizationi). And Bootcamp is not an option as I'm using an M2 Mac... Any help would be much appreciated! Thanks so much
Hi how can i get the time of 10th candle later on H1 timeframe?
Hi all, please see screenshot string str_start = TimeToString (start, TIME_MINUTES ), str_end = TimeToString (end, TIME_MINUTES ), str_now = TimeToString (now, TIME_MINUTES ); I'm getting 00:00 for start and end How can I determine that the market is open for trading
Hi, some of us use the timer to check chart settings for synchronizing etc. I figured out, that some simple executions of ChartGetInteger() can produce a drastic delay of up to 100ms already already in this simple sample. Problem is as usual: Once you use such a timer and you have 10 Charts opened
Hello, I'm new to trying Expert Advisers for ES futures. I've previously used them for Forex with mixed results. Do you suggest trying to purchase one, or to try writing my own first? What are your experiences
Hello guys, I need help adding trailingstop into my EA. Please assist me in identifying the issue so that I can fix it and update my code.👇. if ( PositionSelect ( _Symbol ) == false ){ if (StdDevVal>StdDevAVGVal&& Ask > MaValine && MaValine > MAValue && MAValue > MAAvalue) { int ticket;
double calcLots( double riskPercent, double slPoints){ double ticksize = SymbolInfoDouble ( _Symbol , SYMBOL_TRADE_TICK_SIZE ); ticksize = NormalizeDouble (ticksize, _Digits ); double tickvalue = SymbolInfoDouble ( _Symbol , SYMBOL_TRADE_TICK_VALUE ); tickvalue = NormalizeDouble
I tested my EA in tester and suddenly discovered mysterious problem. EA does not trade YEN pairs except USDJPY . But has no problem with live trading, all yen pairs works there. Digits as always: int digits_adjust= 1 ; if (m_symbol. Digits ()== 3 || m_symbol. Digits ()== 5 ) digits_adjust=
So here is part of my program, in a function designed to loop through all the Symbols in Market Watch: Print ( "assetlist = " ,assetlist); bool selected = assetlist == "SELECTED" ? true : false ; Print ( "selected = " ,selected); if ( StringFind (assetlist, "," )< 0 ) number = SymbolsTotal
Hi, Just working with an EA, and would like to have some safeguards put in. Wondering if there is an EA that closes all positions based on account drawdown from max, say 35% drawdown, closes everything (making sure the entire account doesn't drop to zero. But I also want it to turn off the active
[Deleted]
  The Ultimate AI EA Project  (55   1 2 3 4 5 6)
Hello everyone. I would like to call upon every worthy programmer and trader to a crucial mission. A scientific project of a respectable standard, with the aim of easing the developing MQL programs using every tool available. A good start would be creating a public project then let anyone willing to
  spread filter  (12   1 2)
Hello I would like someone to help me on how to set up the spread filter
Hello, I have a problem, I can't understand and especially to make a line that will follow the high (or low) on the graph. I looked at several forums, articles, etc. but I can't do it, so I'm going to create this topic to get some help. Before I coded in pinescript and as the mql5 is completely
Hello MQL, I would like to ask that , what kind of error is it ? Thanks
Hey all, I'm experimenting with accessing the deal history, however, I can't seem to get the correct format specifier to properly display long values. Here's my code: HistorySelect ( 0 , TimeCurrent ()); int deals = HistoryDealsTotal (); ulong ticket; long pos_id; for ( int i = 0 ; i
Hello experts, Please any one suggest me the solution of this error. I am trying to validate the EA which trade on 2 currency pairs together
//+------------------------------------------------------------------+//| Script program start function                                &n...
Hi, I have coded an indicator, which creates trendlines (MT5). It is working without any problems with live ticks - but I am not able to get it working in strategy tester. Please have a look at the code below for creating the trendlines - with the test data, it should create a short horizontal line...
Hi im new into programming and i trying to figure out how to close a position on the opposide signal but i my tries dont work i watched different videos but no reult. i know the code is a bit messy but could someone help me please #include <Trade/Trade.mqh> input int TimeStartHour = 7 ; input int
Let's say we open a position with the CTrade class. CTrade t; t.Buy( 0.1 ); What is the quickest way to get the open price and ticket of this position or detect failure? As simple as that. Thank you
In the Journal it says successfully loaded but not taking the deal of operation. others working fine but what I want and better for me not working properly
Good day fellow traders, i am looking for an EA that can calculate the drawup of all account positions based on custom comment section , and display it later either in a table , or just in a text file.I couldnt find anything but maybe someone has an answer. Thank you very much , stay awesome
Pls help a line of code, it giving error ''INIT_FAILED' - expression not boolean' and not able to compile. //+------------------------------------------------------------------+ //| Above Below MA(barabashkakvn's edition).mq5 |
Hello I’m new to mql5 I’m trying to program a program with these functions but the compiler executes only the first one If I let the buy condition come first then I only get buy orders and if I let the sell condition come first, i get only sell orders What should i do to get both orders buy and sell
  enum symbo string  (21   1 2 3)
could someone provide guidance on how to do enum symbol selction am working on an multicurrency EA that i need to enum symbols selection example i want to have enum symbol( eurusd,0) 0 is to disable
I am trying to figure out how to convert a double that has zeros in front (eg, 0.0341 or 0.00020) to an integer (eg, 0.0341 to 341 or 0.00020 to 20). All zeros before the first non-zero digit should be dropped and the first non-zero digit to the last digit should form an integer
I am doing a number of calculations involving OHLC of candles. I want all my calculations to be reduced to the number of decimal places that appear on a given pair. For example, GBPUSD shows chart prices to 5 decimal places (eg, 1.12333) so, I would want my double values to be formatted to 5 decimal