Expert Advisors and Automated Trading - page 168

I have the following datetime variable: datetime candleTime1 = iTime ( _Symbol ,timeframes[i],j); and would want to get the hour integer for the candle in a way similar to what is done with MqlDateTime like this: MqlDateTime rightNow; TimeCurrent (rightNow); Print ( "Hour ="
Long before I began mentoring and coaching other traders, I was stuck in the same ‘one step forward, two steps back’ cycle of boom and bust that you are likely suffering through right now. Unfortunately, I’ve noticed that most traders never get past that point. Most traders spend the majority of
1.I'm subscribed to signal provider. Yesterday, signal provider open position at MT time 14:35 & was only copied into my account 8 hours later at MT time 22.18 . Please help to avoid same incident in future (I have yet rent VPS - but so far all signals were copied few seconds after opened (all
Hey , I've been trying to work with OrderCalcMargin which does a good job of obtaining the Margin Used by Each Order , But I'm trying to get the total of all margin Outside at the Margin Variable definition level but I'm getting same value outside the block and correct value inside the block but
Hello. I'm trying to figure out how to write data from a variable for every pass in an optimization simultaneously on every tick to a file. I am banging my head against the wall trying to figure this out. This is my pathetic attempt to make something happen double currentAsk; void OnTick () {
Dear Forum users. I currently use EA for trading. I want to try using signals too what you can bought for $30 or so. Can I still use my EA beside bought Signal at same account, or I need to open new account for that
Hi, I have an EA than has I custom calls on indicators. I need to sell it to someone but I don't want them to download the indicator. how do I entergrate the indicator into an EA? The I custum all is as follows int OnInit () { HAOPEN = iCustom ( NULL , PERIOD_H1 , "heiken_ashi" , 2 , 3 ); // open
My robot was doing bidirectional operation. But the sell position has not been opened for the last 1 week. I have not made any adjustments. Long positions only open
I Subcribed 1 Signals, They opened 1 position but after that time about 2 hours, my Account opened the same position ( At very different PRICE). I closed that position manually, then MT4 automatic opened other position (Because the signals still opened their position): 2021.07.28 09:25:21.303
Hello Friends ,I have a question in mq5 EA coding: How could I open position when the price = A . without using Pending (limit / stop) order... I mean instantly , and let Max Slippage = 1 pip for example ... And avoid more slippage This question is for when the volatility is high OR execution time
Looking for some assistance implementing an idea via meta editor. I am attempting to generate an exit signal on trades placed that compares the open price of a trade + the ATR value for the time that the trade was initiated with the opening price of a new bar. The idea is that when during a buy
Dear all, I'm trying to understand how to manage different accounts with the same EA run. I have two different accounts (let's say 001 and 002). I make the login on the account 001 and then I run my EA. Whatever the EA does, it does it under the account 001 (send, delete, modify orders). But if I
Greetings, I'm looking for a function to close any positions which incurred a Swap - the first swap incurred on a currency pair would trigger a close order in the indexed positions. Any ideas how to construct such function? All the best! K
Hello guys I am a programming beginner, I need help in being able to find the exact time of the EMAS crossing to be able to use it in .... "iBarShift(NULL,PERIOD_M1,????)," What I need is for the function to find the low and high of the price exactly after the crossing of two Emas double MaxPrice()
I want macd to close all positions if the histogram difference is 0.00050. The code should be very simple. I will integrate it into my robot. I have shown it with the attached picture. The only condition is that if the difference between the macd line and the histogram is 0.00050, all positions are
Hi, I'm just learning MQL5 and I have a question that has got me stuck. I'm trying to write a basic script that adds up all of the price values within an array //+------------------------------------------------------------------+ //| Script program start function
Hi guys, I've got two functions defined, one to calculate a "manual" stochastic and another to calculate a Simple Moving Average: double CreateStoch( int Length, int Shift) { int HighestBar = iHighest ( _Symbol , _Period , MODE_HIGH ,Length,Shift); int LowestBar = iLowest ( _Symbol
Hi, I'm trying to write a code that can trade 4 currency pairs at a time, but I only want a maximum of 1 position per currency pair open at any given moment. However, I do not know which Function I should be using for such an instruction. I am currently using PositionsTotal()<4 to prevent more than
The compiler does not detect the following error and compiles the code without warnings. When I create a class like this: class MyClass { public : void MyClass() { } }; and then I want to instantiate it and forget to use the word "new" as follows. MyClass *myclass = MyClass() Compiles without
  Rare code issue  (10)
I wrote some lines using double values : double TotalPositive=PositiveLongs+PositiveShorts; double PositiveProfit=PositiveLongProfit+PositiveShortProfit; double TotalPositions=Longs+Shorts,TotalProfit=LongProfit+ShortProfit; double GlobalTarget= NormalizeDouble ((TotalPositions/ 100 )*Balance, 2 );
Hi, Does anyone know if there is a scalping robot available EMA MA 10 10 1m EURUSD? See attached file. If there is not, is there someone abled to develop the thing for the MQL5 trading platform . Tx, hope to heear form you Michelle
Hi, I derived my Expert from CExpert. For OrderManagement CExpert uses CExpertTrade as a member m_trade. Since I need some modifications of placing buy/sell orders, I've created my on PsExpertTrade derived from CExpertTrade. The problem now is that the main functions of CExpertTrade (Buy,Sell) are
I have been using the same robot for months successfully when suddenly this error occurred and the robot stopped trading: "OpenSellOrder:Trade disabled" Previously, there was an issue with a custom indicator which I had my coder remove. Even with the 'faulty' indicator (it was using too many
Hi, while building my robot I looked into the CExpert class. I see the Symbol-Check but there is no check for the magic_number. What am I missing ? (the Expert should only handle its own orders right?) bool CExpert::Processing( void ) { . . . //--- check if plased pending orders int total=
Hello, It is my first thread. Currently i need to copy all open position from MT4 as a master/source to send and applied it on MT5. Is it any best way to do such things? Any suggestion would be wellcome.. Thank you, Thanks in Advanced
Hello dear MQL5 devolopers please i want to program a trade copier that can automatically copy trade from one account to a remote account, I don't know where to start from . please when can i start from? My language is Python. Your reply will be highly appreciated. Regards, Tom
Hi every body. what is the code for ordersend at a special time and date? for example a buy order at 11.00 am at 7/21/2021
  Problem with OrdersCount++  (11   1 2)
I wrote a simple code to test OrdersCount having (3) different trades opened: void OnTick (){ CTrade trade; for ( int s= 0 ;s< SymbolsTotal ( true );s++){ string SName= SymbolName (s, true ); if (ManageAll== false ){SName= _Symbol ;}
  News filter  (5)
Hi everyone, I would like to create a news filter so that my eas do not trade in the two previous hours at the exit of an important news and also in the next two hours. My problem is that I can't distinguish the important news (which I take in consideration) from those with little importance (I