Download MetaTrader 5

MQL4 and MetaTrader 4 - page 290

To post a new topic, please log in or register
I am trying to read a horizontal line value dropped on an indicator sub window, but having no luck. Take any indicator, drop a horizontal line and change its name to "down" (right click, properties). I then have this code in the indicator: Do object functions work in indicator sub windows as...
Hi, bare with me if this is quite obvious but I am wondering what the correct way of calling an external dll function is. According to its documentation the dll function is expecting a parameter of the type: "pointer to a null-terminated string" So how should I call this function from mql? // first...
Hi all,  I'm currently new to coding and automated trading. I was curious to know, how would I incorporate an rss feed into MT4 and create a trading algo to trade based on the information from the rss feed?   Thanks,  Mitchell. 
Dir Sir,  I found the "Access violation read to 0x09A45000" for the ChartSymbol(), ChartPeriod() after issuing the "PostMessageW(hwnd,WM_COMMAND,CHART_CMD_UPDATE_DATA,0);" in release 670. Is there any way to fix? Great Thanks,
Hallo, I am using A binnary tree to determine the lotsize depending on the profit of the last three orders. Is it possable that the function OrdersHistoryTotal() doenst work while backtesting?           OrderSelect(OrdersHistoryTotal()-1,SELECT_BY_POS,MODE_HISTORY);           double P5 =...
SE VOCÊ SABE COMO CONSTRUIR UM E.A. E MORA NO ESTADO DE S,PAULO ENTRE EM CONTATO mperinazzo@gmail.com . MARCOS
When backtesting my EA I am getting the error "incorrect start position 0 for arraysort function", but there's no info on that error.  When I do GetLastError()  I get error 4051 but I don't think it's related (I had that as my last error, but fixed it so think it's residual), but then again, I dont...
Hello Fellow Trader,   My name is Azhar and I`m from India. I`m here to learn and share my knowledge on Forex Trading.   Happy Trading
Dear guys I create a button. it work on very well. but it is not work on backtest. I don't know why. can anyone tell me how button work on backtest on visual mode.  Thanks 
Good morning to all Wear long time developing strategies renko graphics. I would like to find partners who want to share ideas about renko graphics to create automated systems. Would share development costs. It's an idea, someone wants to join. Kind regards. Hermo.
Can anyone give me suggestions on how to fix an EA that works in strategy tester but only intermittently when attached to a live chart.  Autotrading is enabled and other EA's in the same account continue to make trades.  Strategy tester makes trades using the same price data and there are no errors...
Hi:   Once I place a pending order, what's the way to know that the particular pending order is just triggered?    Using the order counter is a possible way, but if there are many pending orders, I may not be able to locate the particular pending order sent by specific strategy.   Is there a way to...
Hello, I was wondering if it is possible to detect a sudden move in price(lets say 5 pips) in a less than 1second time difference between the previous price. An Example would be: At 4:10.12 the price was 1.6754 and at 4:10.125 the price is now 1.6759. If i am unclear please let me know. Thanks
Hi, First time I try to call an indi into my EA... and I got lost o_O ! Here the indicator: RSI divergence. //+------------------------------------------------------------------+//| Custom indicator initialization function...
How the title says, i am trying to disable my ea when trades not opened by it are already running, i am using the following code: OrderSelect(0,0); {if (OrderMagicNumber()!=Magic) othersplaying=1; else othersplaying=0;}  if (othersplaying==0) {OrderSend(Symbol(),..... etc etc... However, with the...
Dear Guys I draw a button but when i click button it not draw like button. mean: when i click button it going down then again click it going up. but it going to up auto, how like button work:   After click: button going to show down. but it should be up auto.     is there any code that button work...
Need help please - I see various charts where anchor points are being used when changing TimeFrames. These are supposedly on the Bottom left of chart & /or Top Right. Can anyone tell me how to make these visable please - I have tried locating them but no luck. Cheers 
if shutdown the computer and when i open it ea again sending order . how can i stop it forex
Dear Guys How can i write code to add button like that.  
I was studying Average True Range indicator that I realized the calculation used in standard MT4 indicator is different than original formula. The calculation of ATR in MT4 is based on following formula: ATR[i] = ATR[i-1] + ( TR[i] - TR[i-n] ) / n; // n is the ATR period But the original formula as...
Hi, I'm coding an EA that opens Buy a Sell trades when the Price breaks the Trendline. To do so, I'm comparing price values to trend line values. But I don't understand why it's not working. Basically the conditions are  --> Buy if(Close[1] < NormalizeDouble(ObjectGetValueByShift(trendlineName,1)...
Dear Guys, How i create a property with custom multiple option. example My EA will two type of order 1. Stop order 2. Limit Order. So i created a property  int Type  = 0    (0-mean Stop, 1-mean Limit order). But now i want to text into multiple choose . like:     How can i write code like that. 
Just want to draw a line....one horizontal line (will add more after this one works). I drag the indicator (*.mq4) on top of my chart and nothing happens. Why isn't it drawing a horizontal line? What it should be doing is taking the price level "1.68744" and adding variable "hirange" and drawing the...
I am not able to get Meta4 to install. Have placed 2 prior subjects with no answers. Can someone please help? Downloads fine. Get proxy server pop up at location step. Have disabled anti-virus. Made Explorer default browser. Tried clicking cancel and placing Server sent by login info. Using Win7....
Hi, I have a problem....i cant' install Mt4 on my pc desktop. I tried also with s.o win xp and win 7 but the problem is the same. When i launch the executable file of mt4 from the site ( i tried also placing the executable on an USB pendrive) to install the program on my pc after 2 sec the following...
Hi, is it possible to sort an array of structs ? Say: struct profit_targets {    string   target_type;   //name of target, "Target 1", "Target 2"     double   target_price;  //price of the target };  profit_targets   all_TP[2]; all_TP[0].target_type = "Target 1"; all_TP[0].target_price= 1.35666;...
Hi.is there way i could trade different accounts with different server locations on the same meta trader multi-terminal software from the same forex broker.For instance i have from one broker the following accounts Account 1.:  789456   server 78.78.78.79 Account 2 :  321654   server 32.32.32.31...
Hi   I am getting an error message - IgnoreArray - invalid array access - on this .mqh file, when trying to compile it. Is it possibly related to the changes that came with v600?I can't seem to find enough info on the eror message to help me work out what the problem is. I am hoping to use this code...
i'm using build 670.  Say I have 5 separate tickets of eurusd filled.  Can I initiate a 'closeAll' where I send 5 requests to close the orders such that I can send one request without having to wait for the previous request to report back?  In looking at the journal, it looks like I must wait until...
Hi, I have opened chart and under the bars there is RSI indicator and Moving Average indicator on RSI (not on the bars) as first or previous indicator data. Question: Can I code the moment when the line of Moving Average cut RSI line or vice versa? Rgds,