Expert Advisors and Automated Trading - page 134

I was looking at the ExpertMAMA.mq5 file that is in Experts\Advisors, it includes these libraries: #include <Expert\Expert.mqh> #include <Expert\Signal\SignalMA.mqh> #include <Expert\Trailing\TrailingMA.mqh> #include <Expert\Money\MoneyNone.mqh> I was watching some tutorials and the only library
Hi to all! I have a problem: I created a button and added it and connected it to the dialog object if (!dialog.Create( ChartID (),Name, 0 , 10 , 20 , 250 , 300 )) { Print ( "The panel not create! Error = " , GetLastError ()); } if (button.Create( ChartID (), "Pause" , 0 , 200 , 11
Hello, I have tried to create an EA which does the following: If open position moves in profit by 140 points, stop-loss moves in favour by 75 points, then, if open position moves in profit by 265 points, stop loss moves in favour again by 175 points from previous position. Here is an example of the
Hello everyone, I hope you're all well 😊 Let's take a concrete example where I open 10 long positions, with a volume of 0.01 lot per position per bare, i.e. a total volume of 0.1 lot. In order to manage the entire position efficiently, I would like to easily identify these different positions, for
  Translate to MT5  (2)
Hi is there someone who can translate this MQL4 code into MQL5 ? //+------------------------------------------------------------------+ //| Calculate open positions | //+------------------------------------------------------------------+ int
I ran the EA strategy optimization and then selected some of the individual results to run a single test. The single test results did not match the optimization results. The biggest difference was the drawdown% which is much higher with the single test. The number of trades was noticeably lower in
In my quest to assess the sensitivity of spread values during testing I can't quite get my head around what it is doing. I created two custom symbols based on AUDCHF specification. I download bar data from tickstory and I modified the spread values in each file to 24 and 200, respectively. For each
is there a command or a function that can clear the records of the [Expert] / [Journal] tab windows? I thought this will be an easy to find in the documentation / an internet search... void OnStart () { // --- Start of the Script // --- Is MQL 5 command / function I can clear the records of the
I'm trying to experiment with a compression scheme -that will most likely fail- . As i can't cast a 16byte integer , (yes byte 😅 ) ,is there a method to do int128 A , minus int128 B ? What this failed experiment is looking for is to know if int128 A is bigger than int128 B and if their distance is
  Installation is failed  (20   1 2)
Does any one know why? i already bought this EA but seems like doesn't want to get installed
Hi, In the Tester Report we have a lot of useful statistics, including the Average Position Holding Time. Unfortunately, this parameter in not accessible with the Testing Statistics for the OnTester https://www.mql5.com/en/docs/constants/environment_state/statistics Does anyone have a formula or
Hi, can someone correct me what is the mistake below? I got error code 10013 which mean invalid request. FYI, I am using MetaQuotes-Demo account. Thank you very much. My code bool Trade_Buy() { ZeroMemory(my_request); ZeroMemory(my_result); ZeroMemory(my_check_result);&nbsp;&nbsp;...
Hi I'm really quite stuck and not sure how to proceed, so I'm hoping for some inspiration really. I've written a function that uses a Bollinger band with deviation of 2 and another with a deviation 1 which I use to look for a 'zone' and a 'squeeze'. The squeeze is found using the calculation
Hey guys, I am away from my personal computer for a few days, so I can't test it myself, and I couldn't find an answer online, But suddenly it occurred to me that perhaps I have a logical bug in a code I've written. My question is- How does a static variable 'behaves' inside a loop? Consider the
Hello everybody! Do you have any idea with what i have to do? In another post i saw that i have to try again later but still nothing happens, so maybe it's something about my code? thanks a lot for your time
Hey guys, I've tried multiple ways to fetch the execution price from a limit order in demo mode, but all of them failed. Here's my code: #include <Trade\Trade.mqh> CTrade tradeLong; int OnInit () { tradeLong.BuyLimit( 0.01 , NormalizeDouble ( SymbolInfoDouble ( _Symbol , SYMBOL_BID ), _Digits
Dear Support Team, If the MT5 Build 3802 terminal is not logged in (because of no internet connection available) It automatically removes the EA's attached which leads loose all the EA settings. Please fix it as it was working fine even If the account not logged in. Kind regards
Hi, iLow is returning incorrect values for my code below. My code: double entry_price = iLow ( NULL ,ENTRY_TIMEFRAME, 1 ) - entry_tick_buffer; PrintFormat ( "low=%d; entry_tick_buffer=%e" , iLow ( NULL ,ENTRY_TIMEFRAME, 1 ),entry_tick_buffer); iLow values logged: Weird thing is however
Hi, Is there an EA that limits the net open position? For example, say I set a max lot size for eurusd to be limited to 1 lot. I go long 0.5 eurusd and next time I go long 0.6 it blocks the trade since 1.1 breaches the limit of 1. But if I go short 1.1 lot, net position becomes -0.6 so that trade
when migrating the chart to VPS on MT4 the information panel stops working due to the fact that the EA is not working on the local system. Is there a way to have the information panel working to be able to see p&l and control the EA? Thanks
My EA is using a custom indicator, it is able to get the custom indicators handle when I run the indicator on the terminal, however when I synchronise with the vps, it is unable to get the custom indicators handle, when I print the indicators handle in the terminal it is printing the indicators...
  MQL5 orderclose  (4)
Why mql5 don't have and ORDERCLOSE function like mql4 and have a library for that? is there is a reason
Hi .I am designing a semi-automatic MQL5 EA . For each position manually I have to place SL and TP . Is there a way to enter TP and SL in the Strategy tester at the moment when the position is to be opened or by default the position will be opened with a TP and SL after that I can edit TP/SL or drag
Hello, is there any way to assign a BuyStop Order a upper Limit ? Example: Current Price: 100 usd BuyStop Limit: 100.5 usd Now happens a gap to 101 usd The BuyStop gets executed at 101 usd but you wanted to just execute the Order at 100.5 usd with a maximum slippage (delta) of 10 cents. So how can
What is this error warning ? thanks
Hi i have this comparator of ticks (to determine whether or not compression and decompression results in the same tick stream) The function reports a difference in tick flags but i cannot make it report on which flags specifically. this is the function : bool compareTicks( MqlTick &a, MqlTick &b){
  Identify orders  (4)
In mt4 how can I know an order executed by EA from which chart if I am using multiple windows of same currency pair
Hi all, I want to code an EA in MQL5 whichcloses a position after x bars (let´s say after 6 bars or after 6days in D1 chart) regardless of whether it's a win or a loss.Normally the position is already closed 1-5 bars after entry becauseof a trailing stop but sometimes not. Therefore I would...
[Deleted]
Hi all can any one help me i want MT5 EA,Ppending order if not triggered and the price is reached tp or sl the EA will delete the order automaticlay. Thank you
Hi, I've thought of the Sleep function, to close an order and emediately onpen one (If you know a better solution, please tell). How much time in ms do I have to have between closing an order and opening a new one