MQL4 and MetaTrader 4 - page 162

To post a new topic, please log in or register
Below is a short piece of code as I try IF statement for the first time MQL4 - It takes the difference between he high and low of the range to determine the stop loss value in points.  Currently, this is only running for specified pairs (but I will amend it to run on any pair at some point and work...
Hello, I'm newbie with mql4 but I have some experience programming in other languages...  This is not my first EA or code... but I don't understand where I fail, so please I need help.  In the array  ticketoperacioneslong  I memorize the ticket of the orders i placed. I want to be advised , informed...
Hello !   I'm very angry at MT4 as I bought a few indi, I had 5 activation at first.   I use 1 as normal, than I HAD to use another when windows update to 10 (I heard some people got their activation back). Today I need to update an indi I bought on the market and I'm still ask for an activation. !...
Hey guys. I am desperate of getting more history on some trading instrument charts. Looking for Palladium, Platinum and Copper history. Can anyone advice on if and how this can be done? Tools/History Center doesn't help. Thanks in advance!
Hello everyone I stated this symbol:       SetIndexBuffer(6, InIndicator);    SetIndexArrow(6, 83);    SetIndexLabel(6, "InIndicator");  how do I draw it on the chart just insert the indicator?
Hi All, Looking to write my own EA with some complex trading logic. I used to code C# many moons ago. Rather than spending the next weeks relearning, I am interested in saving time by acquiring a pre-written framework with integrated position management including stops to break even, trailing stops...
Hi all, I'm writing a simple code to open a position BUY and SELL...just to learn, but it doesn't work. Anyone can tell me why? I have declared all variables (SL, TP and lots) and the code has been compiled succesfully...but it doesn't open positions... Thanks in advance int OnInit()   { //---...
Hi, i have some important questions to ask about slippage in my EA (using ECN broker and low timeframe): 1) If i put an OrderSend() function it actually and set the slippage to lets say 20 fractional pips, that means that if wont go in the trade if the price moves more than 20 fpips before the...
Hello everyone, I'm trying to add two buffer in the indicator camarilla. I would like to add two lines with Buffer, the H3 and L3 values but I can not properly close the code. A little help, please? #property version   "1.00" #property description "" #include <stdlib.mqh> #include <stderror.mqh>...
peterhw
I have the following error in my own log file. My_error: 5002 wrong file name My_FileRead_Handle =0, fname = C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\9ACB2E2CE0389240C909714389C79575\logs\20161108.log The file appears to be where I think it should be and the error occurs when I use the...
Could someone please explain how i actually save a custom indicator in Metaquote editor and then actually put it onto my chart??
Hi All, I'm currently generating a EA which makes use of multiple time frames, however, the tester on MT4 seems to only allow me to back test by attaching my EA to a single time frame. By doing so, my EA is unable to get any data from another timeframe. i'm using MT 4. Is there any way to get around...
Hi all, I am AnbuRajan. I just a starter of MQL4 coding , i have learned coding with C  programming during my college  but have zero experience . Now i started with simple EA and backtesting , during this time have arising lot of doubts. But couldn't get solution by myself and looking for a mentor...
I have not written anything in a long time and noticed no ea folder anymore. I read about a roaming folder so I'm assuming it's something I have to learn about. Just wondering how and where to copy ea's that I wrote in the past so I can make them work again. Please advise Thanks
I've eliminate all of the compile errors in my EA mq4 source code except this one: '\End-of-program - unexpected square bracket'. I don't see any square brackets at the end of the program or anywhere else in the file. Can anyone suggest what to look for to remove this error. Thanks for any...
Hello All,  I would like to use the Strategy Tester Optimiser (MT4) to do random (use random combinations of my variables) passes, rather than the Genetic Algorithm optimise these variables for a particular factor (Profit etc).  If anybody knows such a way to achieve this, I would be very grateful...
  Using "Print" (9)
I do some printing with the "Print" command.  MT4 The charset used is not with fixed width for different characters and that messes things up. Is it possible to chose a charset with fixed width for all characters and symbols?
H have problem with installing metatader4  when I am trying to install metatader  4 it is installing metatader5... what's wrong?  
Dear all,   Hope anybody can answer the following questions relating to the use of arrays in indicators: Is it correct that an global array is re-declared once the change of the timeframe of the chart causes the indicator to go through the DeInit and Init functions?   I see the size of a particular...
Hello everyone, I am a beginner MQL4 Programmer. I want to know that how to protect my EA to use specify trading account and how to time limit to my ea.  Please Help me. Thank... Everybody...  
I'm baffled by this problem, and after trying everything I can think of I realise I need some help! Basically my EA will happily open buy orders but refuses to open sell orders, i can't work out why.. Here's the SC    int StopLossPriceB = StopLossPips1; int TakeProfitPriceB = TakeProfitPips; double...
Hello all, I have been trading forex for a while, but would like to get into using robots and building my own. My broker is forex.com and they dont use mt5 yet I think. Anyway, how can I begin to start learning how to code automated robots? Where to start? Any suggestions or help would be...
Hi, I'm in the UK and I have an EA that will trade the Australian 200 Index. This means that the Index opens 23:00 and closes 05:00, which is confusing my EA, because if I open the MT4 platform at say 22:00, it thinks the trading day has already been and gone (finished at 05:00 that morning rather...
Hi, I just realized in MQL4 iADX is defined as: double  iADX(    string       symbol,        // symbol    int          timeframe,     // timeframe    int          period,        // averaging period    int          applied_price, // applied price    int          mode,          // line index...
Hi, I have an EA made for me by a coder who I've lost contact with. It works fine until I place a separate trade, whether on the same chart or different chart, whether from another EA or a manual trade, I get the error on the MT4 platform that says: "Array out of range in 'dowgap_2.mq4' (210,27)"....
Hey guys, I just need some help with the logic to this problem I seem to be having, and perhaps it is because I am thinking of this in the incorrect manner? So, for finding the time of the beginning of the week from any given day within that week, I have simply  used: int day_of_week=DayOfWeek();...
Hello !!!! This is an example how could look like a dynamic polygon using canvas in mql4.. Could somebody guide me..or show me an example of script to do it?   I dint not find any help how to doing.. the values from EUR, USD,GBP., etc are dynamic and coming from an indicator.  (in total...
I want a pending order to replace itself after it has been closed. For example market moves from 0.75000 and opens a buystop, market moves to 0.75200 and I profit 20 pips. How do get that buystop(now a buy limit) to be placed again at 0.75000 upon closing the original one (ie. replace itself over...
Hi.... would anyone help me ? I code OrdeSend function like this: OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask-Take_Profit*Point,"GBPUSD Auto ProSpeed",16384,0,Green); I get the error 4109, Trading Not Allowed. Not allowed by server? or problem in client? Last week there were no problem with this...
How do you convert your indicator to non repainting indicator?