MQL4 and MetaTrader 4 - page 61

Is there a way to get the bar index for which an indicator was called for from an ea ? (besides writing to a file and having the indicator pick it up)
Can i use closed order comment to work my EA trading decision or it is allowed in MT4? for(int i= OrderHistoryTotal()-1; i>=0; i--) { if(OrderSelect(i,SELECT_BY_POSITION,MODE_HISTORY)) if(OrderSymbol()==Symbol() && OrderMagicNumber()== Magicnumber) { if ( StringSubstr (OrderComment(), StringLen
I have an EA with a routine that runs OnTick(). It monitors the current chart's pair. But I want the same EA to check other pairs too. The problem is, the routine only runs OnTick() by the current chart's ticks. It can't see ticks in other pairs. Or can it? Is there some way to capture ticks from
I have writing a script and it work fine if I have the File path set as... string mySpreadsheet= "Account.csv" it will save the file in the files folder in MQL$>Files like I would expect Fig1 but if I change the file destination folder, to say string mySpreadsheet= "G:\\My Drive\\Account.csv"
&& iEnvelopes ( NULL , PERIOD_CURRENT , 27 , MODE_SMMA , 0 , PRICE_CLOSE , 0.5 , MODE_UPPER, 8 +i) > iEnvelopes ( NULL , PERIOD_CURRENT , 27 , MODE_SMMA , 0 , PRICE_CLOSE , 0.5 , MODE_UPPER, 9 +i) //Envelopes < Envelopes && iEnvelopes ( NULL , PERIOD_CURRENT , 27 , MODE_SMMA , 0 , PRICE_CLOSE
Hi All, I am relatively new to mql4 so apologies if my question is quite simple
ObjectCreate ( "Lot_Edit" , OBJ_EDIT , ChartWindowFind (), 0 , 0 ); ObjectSet ( "Lot_Edit" , OBJPROP_CORNER , Corner); ObjectSet ( "Lot_Edit" , OBJPROP_XSIZE , Button_Width); ObjectSet ( "Lot_Edit" , OBJPROP_YSIZE , Font_Size* 2.8 ); ObjectSet ( "Lot_Edit" , OBJPROP_XDISTANCE , 135 +
Hello, I have problem with instalation MT4 or MT5 on Raspberry Pi 2. I need some Proxy information. I haven't proxy. Can you help me?
Can anyone help me. In " SymbolInfoDouble(Symbol(),35)" value 35 is useful for what on mq4
it starts and ends without any result. what did i miss? int slippage; double stopLoss; double takeProfit; bool isWeekday = (TimeDayOfWeek( TimeLocal ()) >= 1 && TimeDayOfWeek( TimeLocal ()) <= 5 ); bool isTradingHour = (TimeHour( TimeLocal ()) >= 0 && TimeHour( TimeLocal ()) <= 23 );
Hello, I combined two indicators such as momentum and moving average of oscillator (OsMA) on same window. I add level 100 on momentum parameter and level 0 on OsMA parameter. Now I would like to use these two parameters to determine the signal by coding on MQ4. Anyone can help? The point here I
  Strategy Tester anomaly  (12   1 2)
Hi Any help or explanation much appreciated This is some EA OnInit() code int OnInit () { datetime CurrentDate = ( iTime ( NULL , PERIOD_D1 , 0 )) ; Print (CurrentDate); } When I run the strategy tester its prints the date once as expected when the EA starts If I add one or two or a
hi guys, i need to find index of selected order in history trades.do u know any function for it
Hi there experts, I've tried several times to download the mt4 installation file from this link https://download.mql5.com/cdn/web/metaquotes.software.corp/mt4/mt4setup.exe?utm_source=www.metatrader4.com&utm_campaign=download and install mt4 in a desktop. But unfortunately it's installing mt5
Ive downloaded MT4 2 times already and it keeps turning into MT5?! what is going on?? AM i going crazy
I'm trying to move an adaptive ATR up to the main panel on my charts (see first pic). I can access the settings for the indicator (second pic), but no parameters that might allow me to move it to a different panel. Can anyone offer a solution or guidance? Thank you! Brentley
OnTrade() operates in mql4? Accustomed to mql5, I see that does not work in mql4... It's like that?
#property strict#property script_show_inputsextern datetime TimeNowTest = D'2015.01.10';datetime DayLightShifts[9] = {D'2014.11.02 02:00', //0                              D'2015.03.08 02:00', //1                              D'2015.11.01 02:00', //0                              D'2016.03.13 02:00',...
Hi friend , Is it possible to get High and Low of a candle by click on it? I need ti get information of a candle by click on it.
Have anyone here used the FindWindowA function yet, I passed the class name and window name parameters but couldn't get the hwnd from this window, someone help me please //-- #import "user32.dll" int FindWindowExA( int hwndParent, int hwndChildAfter, char &lpszClass[], char &lpszWindow[]); int
Improperly formatted code removed by moderator
Hi All , i have achieve when OrderTotal = 0 then OpenTrade at this Symbol (EUR/USD). But when there's opened trade , example : (GBP/USD). not EUR/USD, How shall i open a EUR/USD Trade. Files Attached. Thank you
  MT4 VPS problem.  (11   1 2)
I've tried to use MQL5 VPS in the past and it missed majority of trades or seemed slow, but obliviously it is appealing for automation. So recently I tested the VPS versus desktop speed, and I'm confused by the results. Both were running exactly the same then I migrated one to VPS. Trades on
Hello everyone, I am desperately going around in circles to debug my problem of validation of my new EA. Apparently the test does not want to open any position on 4 currency pairs (see attached screenshot) while on my side, when I test them, I have no worries, no errors and multiple positions open
Hello everyone, I'd like some help regarding a class declaration, I basically want to declare a new class on a global scope to be used in different functions, but this class uses variables as parameters that may not be correctly initialised until the OnInit() function, is there a way to declare a
  Grid Trade  (3)
Hi all expert, Would like to enquire a mq4 code question I have Opened a Buy trade. I'm trying to Open a 2nd Layer Grid trade after 50pips away from the first Trade entry price. No matter Profit or loss. And open Another 3rd Layer Grid trade after 50pips away from the first Trade entry price. No
Hello, I'm coding up an EA. In the EA, I get the following error while trying to modify an order: 0 12:35:41.007 Algorithm1 XAUUSD,H1: Failed. Order Modified 1.5To3 SLOrder #664704280, TPOrder #664695196, false 2025.94 2026.0. Error Code: 6 2 12:35:41.007 Algorithm1 XAUUSD,H1: ExpertRemove function
  Array Search  (4)
Hello! So I have this array of a struct: struct exmpl { double orderstoploss; int orderticket; string ordercomm; }; exmpl arr[]; And i have this function that i use for searching . Is not working on struct arrays. How can i search for a value in a array of a struct ? thanks
[Deleted]
  Print true  (3)
Say, I have this code bool A = true ; Print (A); The print output is 1 How to get it to print true, instead