MQL4 and MetaTrader 4 - page 440

To post a new topic, please log in or register
Hi, I am struggling to solve the following problem:  I have many charts open on which I am running different analysis. In most cases, there is no action of visual check needed, but in some cases yes. What I want is to send an alarm sound, plus bring the chart in front. I have tried many user32.dll...
Hello, I have programmed an indicator which seems to work at first when placed on a chart but will change it's behavior when running. I know it has something to do with how I'm calculating Limit for the for loop. Maybe I'm missing something obvious... Here's what I've got: (running on the M1 chart)...
Hi guys, I just bump in to MathRand() function but it only calculates positive number. Do you have any idea on how to get random double numbers from -1.0 to 1.0? Thanks...
The tested tick value  of EJ is 100, the deposit currency is USD.   I think this tick value is not correct,but the broker agent insist that it  is right.     //+------------------------------------------------------------------+//|                                                    tickvalue.mq4...
I want to calculate the slope of a moving average of 200 periods. I want to use the values of periods -12 and -2 (periodes couting from actual period) for calculate this slope. Can I acess historical values of a moving average?
Hi there, I'm trying to create HLines for every specified amount, for example every .0025 pips there should be another HLine. I've tried to do this on EURUSD with a script on and a custom indicator but no luck. This is the script version string objectName = "HL at: ";long chartID = ChartID();double...
I'm looking for a way to find the last high and last low based on moving averages.  The arrows in the attached image show what I'm looking for.   I don't use the current moving average trend.  I look for the last swings.  I've drawn the lines that are the last 2 'swings' in the High and Low. I've...
Hi All, I currently have an indicator that i am happy using which will simply place an Up Arrow or Down Arrow over a bar. I would like to know if it is possible to create another indicator that can read/pick up when an arrow has been placed on my chart. If this is possible could you please point me...
I would like to be able to place a Limit order at a specific price, and then when the order is placed, put another limit order at the previous price.  I know how to open and close trades, but haven't worked with Limit orders.  Does anyone have ideas on how I would accomplish this? Thanks!
when I compile the code (indicator), it does not say any errors. But when I try mounting indicator in the window price, the indicator box appears, but not the line of the indicator. Does anyone knows why is happening that? This is the code:...
I decided to open a thread for functions, that seem weird to me. It is not a bug report, just rather a warning for users. long  ChartOpen(    string           symbol,     // Symbol name    ENUM_TIMEFRAMES  period      // Period    ); Opens a new chart with the specified symbol and period The most...
During testing of an EA the terminal crashed. Normally I am able to go back into the terminal and continue where I stopped. This time the terminal does not run but crashes immediately after trying  to restart. How do I fix this?
Hi: I've most probably developed a monster that haunts me. It (this monster EA) trades with NO issues if I trade ONE pair. But its designed to trade up to 25 pairs at the same time. So - when I put it on (say) 15 pairs it also goes well - but up to a point. That point is where one or more of the...
Hi all, Is there no way to change symbol names in mt4?. If i want to import historical data diferent to forex pairs i can't find the way to change or create new symbols names, i'm trying to use mt4 to backtest other products, for instance, importing futures data. Is there a way to add or change...
What is the difference Between Indicator and EA ?
Hello. Hope somebody want  help me.  I have updated my pc from Windows XP to Windows 7 , and reinstalled the Metatrader 4. After that, I moved my experts and indicators to the correct folders (my experts in the folder MQL4 > Experts and my indicators in the folder MQL4>Indicators), but when I launch...
Hello, i am looking for a private lessons in mql4/5, online classes, maybe by skype or something similar. i can study alone, but i think that i spend too much time to find answer for any tiny error that can happend. i preefer spanish, but english is ok. Greetings from Chile
Hello, i need a script to save the data of candles marked by vertical lines as csv or html , can anyone help ? :| , or is there any script can do that?
How to export data in some data type before stop EA ? When start EA again ,how to import data back ? Thank you
Hi, I am learning to use an array of the structure data type.  Specifically, to accessthe multiple dot-notated variables' from the structure array .   I can declare a structure, list thevariables, assign data to those dot-notated variables, declarean array from the structure data type, assign the...
In this MQL4 source code, we see dots in variable names, e.g.: extern bool    ShutDown.NOW=False; However, when I compile the code, the compiler expects a semicolon where there is a dot above.  A similar question has been asked and the replies made it seem that a dot could be part of a variable name...
I've found from other forum with the below script to identify whether the Zigzag pointing UP or DOWN. However, the below script has discrepancy with the original Zigzag indi. What I would like to have is to identify the current direction of the original Zigzag indi to execute Buy or Sell & close...
Hi, This is my first time customising my own indicator and I have a problem that I hope some seniors may help me with. The problem I have now is my indicator's line graph won't draw properly because some values (outliers?) are astronomically high when compared to the rest. The result of this is, the...
New article Upgrade to MetaTrader 4 Build 600 and Higher has been published: On February 3, 2014 we released the new MetaTrader 4 build 600 with the completely revised MQL4 language and access to the Market of applications. In addition to the updated MQL4 language for programming trading strategies,...
 i hope change MultiTerminal StopLoss and TakeProfit from price to pips change pips  easy change price trouble
Hey MT4 World...  Hoping someone can help with a problem...  I have an EA running with about eighty variables... When I open MetaEditor and update just ONE or TWO variables in my EA - and then save/compile...  And then open MetaTrader - and click on Expert Adviser -> Properties -> I see the...
I would like help in doing a project please as subject to help speed things up when trading please.
I heard MT4 was portable, so I recently downloaded MT4 onto my external so that I can work on code while I'm not on my home desktop. I can access the terminal and charts fine, but I can't access meta editor. Pressing f4/clicking on it in the terminal doesn't bring anything up, and if I try to open...
Hi, I would like to count every tick for each 10 last bars (with the current bar) in PERIOD_M1. How to do it using MQL syntax ? I would like to get the following results: bar 0 (ticks counted: for example 25) bar 1 (ticks counted: 58) bar 2 (ticks counted: 28) bar 3 (ticks counted: 37) bar 4 (ticks...
Hello I can't seem to find an explanation via the help icon so I thought I would ask here. Please could somebody tell me what the variable inputs mean as shown in this picture:       Are the values in percentage terms? What exactly is MaxEARisk? is it risk per trade or risk per all opened trades? Is...