MQL4 and MetaTrader 4 - page 444

How can I change the maximum lot size an EA can trade with in MT4? And how can I activate 'autotrading' for each forex pair separately in MT4?
CurrentPrice = Bid;              while((Bid-OrderOpenPrice())/_Point > TakeP*3/4){                  if(Bid > CurrentPrice){                   CurrentPrice = Bid;                   TakeP = (CurrentPrice-OrderOpenPrice())/_Point;                   }              }...
I submit the local compiled code on MT4, and find the system prompt error. How can I solve it effectively?
Am i right that MT4 will not store what each individual trade margin is per a trade? Can i select a order and just display what has been put up for this order? I understand i can do the calculation which is very straight forward but things get a little tricky with tiered margin. Thanks for your help...
Hello,  When I try to change a stop loss line with the cursor.  1.- I put the cursor on the stop loss dotted line  2.- Then I click the mouse en two horizontal lines appear and I can only move in horizontal sense. So I can not change the stop loos line.  I saw other people chaging stop loss with the...
Good morning, This might sound like a silly question but do mt4 indicators have compatibiliy with mt5? Thank you.
Here is the code i'm using int OnInit(){   Print("init Year: "+Year());   //---   return(INIT_SUCCEEDED);}//+------------------------------------------------------------------+//| Custom indicator iteration...
Hi All I've searched high and low to try and find a template EA which allows you to refers to an indi with a simple arrow up / down trigger but can't find one. I just wanted to create an EA to trade the attached indi with SL/TP/trailing? I'm not a coder so couldn't create one myself but could insert...
V_LINES are created in the Chart  Window. OBJPROP_BACK, true places the V_Lines behind the buttons in the separate window - as per attached image. The V_LINES in the separate window scroll with the chart window - the buttons remain stationary - The V_Lines above and below the buttons form a...
I'm stuck with this code, i have to find the highest and the lowest in like 161 candel, and that's ok, then i have to draw a vertical line  N candle forward where the price doesn't arrived yet , what is my error? here is the code : void M()   { int max = iHighest(NULL,0,MODE_HIGH,161,0); int min =...
When an EA starts to get fairly large, structuring the code gets vital. Ways to structure.  - Subroutines in main code  - Include subroutines  as mqh  - Include classes  - Libraries I have favoured Libraries. You get a clean interface and good "isolation". During development it is a bit of a...
I was recently looking for some code like new candle but loads at first run then waits for new candle to run indicator faster... and accurate.. But during my tryouts come of wit this solution Time frame independent. Let me share and what you think?...
Is anybody familiar with the GetClassName and GetTitle functions in C++ and whether or not they have equivalents in mql4?
Hey guys,  Brand new to MQL4, been reading the docs and all that, so go easy on me!  Just wondering if its possible to initialize an array with a variable length.   For instance, the following works fine:   double blah[10];   ...Whereas this doesn't':   int arrayLength = 10; double...
Hello I'm a newbie using MQL4. Can anyone suggest me how to check existing order in range example I want to know how many order in price 1.25000 - 1.26000 and what is the order pending price. Are there any command to check it? Thank you
Hello everyone, Are chart_id's random numbers generated by forex/MQL4/5?
Hi, is this possible?  Really don't want to constantly change every part of the date/time/year/ every time i need a little adjustment.  I want the default when I start the EA to be the current datetime.  Can anyone help with this?  Thanks.
  Error 148  (1)
Hello, I have a question with error 148. I checked the max pending with this code. int max_allowed_orders=(int)AccountInfoInteger(ACCOUNT_LIMIT_ORDERS); Some time results =0; What is the meaning? Is it mean no pending allow?  But when I send manually pending order to the account, it is successful....
Hello everybody, actually I am using this EA to close at a profit level and deleting all Pending Orders placed left on Terminal. It works perfectly but I would like to add this functions: 1) Delete Pending Orders    True/False options,to activate or de-activate and a  2)"Value of Total Orders"...
Hi all, I am using MACD indicator in MQL4. The issue I am facing is macd showing different value on mouseover but in code it is giving different value. Please refer to the blow snapshot  for value  of histogram and highlighted value printed via code. 4.8766603758299e-05
Hi, I recently returned to using some of my old MT4 charts and modifying an old indicator. The original works perfectly well, however, when I modified the timeframe to make it calculate and draw lines for 4H candles, it doesn't work.  There is no error message when the indicator was compiled, but it...
Hi everyone, I am trying to get my EA to send the key command "ALT-R" (Tile chart windows) periodically. I'm using the following code. #include <WinUser32.mqh>#import "User32.dll"void Tile_Windows()    {   keybd_event(12, 0, 0, 0); // ALT down   keybd_event(52, 0, 0, 0); // R down   keybd_event(52,...
it's possible create a alert on MACD indicator when cross with zero
  Sounds  (2)
I must be dumb dumb dumb Can NOT find where to set a sound/alert for when a trade is opened or closed on MQ4 - using an AE and there is no tool on it though it's my first time with one... is that even standard for those? Any help would be excellent :) Linda
for example, I'm running an indicator in tester mode on GBPUSD pair. I would like to know how to get RSI value of USDJPY pair?. I've tried iRSI("USDJPY",0,14,PRICE_CLOSE,i), it's not working properly. Thanks!
Hi About a month ago I purchase an mt5 indicator and most of my main indicators is on mt4. Would it be possible to switch my recent indicator purchases into mt4? If so, where would I do this or who do I contact? J
Hi guys, anyone knows how to code an alert in mq4 please..I need to have an alert for when there is a color change signalling a reversal. Please have a look at the pic attached. At point 1 we can see that as the candle reversed into an uptrend there was a color change in the 2FMA's (from red to blue...
I have been adding few complex indicators on 90% of opened charts. The quantity of opened charts at the same time is around 120. Due to the terminal's system overload (hardware capacity), I get error message saying mt4 terminal has encountered a problem and needs to close. Then it automatically...
Hello, I'm trying to make the trader able to set MA type on an EA, I tried this coding: enum MA_Method {   Simple = 0,   Exponential = 1,   Smoothed = 2,   LinearWeighted = 3};input MA_Method Mode = Simple;double SlowMA = 200;//...//Some Coding//...double SlowMA = iMA(Symbol(),Period(),SlowMA,0,Mode...
  Strategy Tester  (2)
I am newish to the Tester (historically never got anything very useful / understandable). I have been trying to use an AI based EA and suggests using the tester. I run from 1-jan-2018 and have no trades but the following messages in the journal. 2018.02.23 08:41:41.780 TestGenerator: unmatched data...