MQL4 and MetaTrader 4 - page 166

To post a new topic, please log in or register
Hi Guys, I'm having trouble with one of my sell signals.  The buy signal works perfect but when I turn it around for a sell signal it gives me a False statement the whole time. double MA1L15 = iMA(NULL,15,7,0,MODE_SMA,PRICE_OPEN,0); double MA2L15 = iMA(NULL,15,21,0,MODE_SMA,PRICE_CLOSE,0); bool...
Hi Guys, This is probably a simple question but I've converted my code to run short trades too but for some reason it won't execute any short orders. Could someone please help? I am sure that the short order is just in a wrong place? The code is written specifically for EUR/USD  Any help will be...
Hello. Ihave problem with getting time values for bar in higher timeframes. I'm testingmy expert advisor in tester and when I try to use function iTime with PERIOD_D1parameter I always recessive value 1970.01.01 00:00:00. Also GetLastError methodreturns "not enough memory for history data" message....
hi, im trying to code a basic expert advisor . at the top of my code I have written   extern double Lots =100; so that sets the amount of lots my expert advisor trades with to 100 lots . I want to change this. my question is , how can I code my expert advisor to trade the maximum amount of lots...
Did you know XM mt 4 doesn't work with VPN on mac? i cannot believe that 
I have noticed recently that the indicators (of MT4 in the market) can be demo tested in the strategy tester. I downloaded the latest MT4 (build 765) from metatrader4.com. However, I do not see any change in the strategy tester similar to what MT5 lets users to test the indicators. Does anybody know...
Hi there,   Just a question to make me understand for a bit how Metatrader works. I am confused about how the indicators are used. So any clarification I can get is more then welcome :)   Question: I notice that for example, if I call the MA indicator just once in my entire EA, it will still show up...
Hello, I know that it is possible to have a 10 tick time frame indicator, but does anyone know if there is a way to basktest an EA on a 10 tick time frame ? I did not read anything about this.    Thanks for your answers. 
Hi All. I have an EA based on EMA crosses in multiple timeframes. I want the EA to draw all of the EMAs I am using on the chart that it is attached to when I attach it. Planning on having it change colours based on trend conditions etc. I couldn't many instances of this or much help, not sure...
hi I want to only open 2 orders every day. But i don't know how to count only the current day's orders. to be more clear, I should count today's opened orders before opening a new position. if they were 2 then stop opening a new order for today. Please help me in this piece of code. Thanks
Hi  Have search a lot, but unable to find anyanswer..  I want to make an optimization towards highest(and I hope I use the correct terminology) regression. That is, the most “strait”Balance / Equity curve. To not trade at all would of course give highestvalue :D.. Any suggestion? Best Regards /...
Hi I wrote an expert to open two position at the same time. and close them when the total profit/loss of the two order reach the profit/koss target. User can enter the symbol names and type of two orders as input. I did this: input string   FirstSymbol="GBPAUD"; input string   firstaction="BUY";...
Hello, I am attempting to modify a TMA centered indicator and could use some help. As the indicator stands now it plots points where price breaches either of the bands. The logic I am attempting to implement is fairly simple: If two consecutive breaches (the teal dots in the picture) of the upper...
Hello,  I was wondering if anyone can shed light on the following error:   Would appreciate suggestions on how to fix it. There is plenty of margin available and the lot size I used is  0.03  Much appreciated, Thanks, B 
How to reduce/limit number of bars in IndicatorCounted? For example: I want to count candles in 5 days of every time-frame.
Hello Please can someone explain why i get this warning when complying my EA. 1 Warning  ...  "no indicator window property is defined, indicator_chart_window is applied"                 (no line number) 0  (no column) 0 I have had it before then it disappeared and I cant figure out what i am...
Hello,   I want to measure RSI of MA. I found this code from code base and try to modify it, is this give me the correct result ? or is this the correct way to do it (because I believe it is not)? My next goal is try to do it RSI of Any indicator data. I saw some indicators can be applied to...
Hi I have following code for adding time gaps between alerts, otherwise tick by tick it creates many continuous alerts. static datetime TimeStamp; if(TimeStamp != iTime(Symbol(),PERIOD_M15,0) && some conditions) { Alert TimeStamp = iTime(Symbol(),PERIOD_M15,0); } But in this code, when then a...
Hi, I cant seem to get the Max Orders to work. (Max Orders being maximum ammount of trades open at a time) A little help please and thanks! Here is the whole EA code [Very simple 2 moving average EA] when the lines cross it trades.   #property copyright "Reilly" #property link      "https://www.mql5...
Hi...   Houston, we have a problem! lol How can i avoid problems with error 128 on OrderSend ? On this code... i am opening a first order, and next order is opened as a Pending SELLSTOP/BUYSTOP order ... But, only if there is at least one ACTIVE ORDER... But... if i sent a order and returns error #...
  MT4 to MT5 (4)
It seems that MT4 will disappear and be replaced with MT5. Please can somebody tell me whether this will mean that my MT4 EA will need to be modified?
My mother language is not English,I hope everyone can understand what I'm saying and give me some help.Thank you very much. I have 12 charts.I want to use  "GetParent(WindowHandle(Symbol(), Period()))" to get the parent hwnd of specific chart and Show it .But sometimes it show,sometimes not. #import...
Not sure if it's me or not,  but the MQL4.Com Website seems to be down...  Is it working for anyone else?   Thanks, 
Hello Everyone   Wehen i compile my ea there is a warning that there is a problem with OrderModify() but i cannot  solve what the problem is ?!   I would appreciate if someone could take a look at it.   sincerely   akuh 
The latest MetaTrader 4 for iPhone/iPad features a completely new design of messages. MQL5.community messages and push notifications from the desktop platform are displayed as chats similar to those used in popular messaging apps. In addition, it is now possible to switch to any of the 22...
i've got 12 symbols that have 30 pip stoploss and each can trade by percentage of equity or lot size. i can see that they each use a relative drawdown of up to 17% and as low as 1%. after comparing the statements of backtests it would seem there are times there are experts that open trades at the...
I have a pending order, and I want to check if it's opened or not, for the reason to delete an other one. I tryed to use the fact that OrderType() change value when Order is open from OP_BUYLIMIT ( for example ) to OP_BUY but this is not working, it chang value only if the oreder is closed by...
Hi; i am tinkering for building an indicator program where i try to simply  draw trendlines, every time with the same fixed angle, when and where, the indicator I made of bits of everywhere code recognizes various candlestick patterns; but i got creased only at this point and i have tryed to draw...
Everyone, nice to meet you. I am not good at English. I would like to uninstall the MT4, but I can not. My OS is Win7. I logged on to the OS with administrator privileges. When I try to uninstall, Message:"Referral was returned from the server", or, "Does not have access to uninstall the Meta Trader...