MQL4 and MetaTrader 4 - page 58

To post a new topic, please log in or register
EX4 file must be compiled using #property strict directive. I am getting above error while uploading new version of EA to market for MT4. Can you let me know what I need to do resolve the issue.
Hi, int start(){Alert(iVolume(NULL,1,0));return(0);} This simple code will print number of ticks on the current M1 Bar in a box near the chart. It works fine when I attach the ea to any chart However when I run it as a backtest with "Every tick" it prints huge numbers like 38654705672 in the journal...
  MT4 Scale Fix (5)
HI , could you please assist me on this issue ,  when i fix the scale one to one in mt4 for D1,W1,MN period the chart will be distorted and you can not read it. i mean the bars will be very long and it will not fit the screen , the opposite for H1 period. thanks in advance.
  Volatility indicators for MT4 (118   1 2 3 4 5 ... 11 12)
What volatility indicators out there are coded for MT4 that I can use other than the Bollinger bands? Please post links if you can. I'm looking for a way to better place my stops based on market volatility
Hi, I'm editing MACD Sample, using H4 AUDUSD, I want to use the entry conditions supplied, but i want to delay it by looking for a correction in the trend then enter. I used an input called 'Lookback', created a for loop that loops for i=0 to Lookback. The Problem I set the Lookback to 5, it will...
Hi coders, I made an indicator which should show an alert every minute. That works fine but when I change timeframes, it immediately shows the alert without waiting for a new m1-bar. I know this happens because the static datetime variable is initialized with a change of a timeframe. But I want to...
Hi, Need an EA having input as :  "maximum spread allowed"   :  (any number like 10/20) Now, suppose I try to place order and if spread at that time is less than or equal to defined number in input parameter, order should be placed.  If spread is grater than number defined in input parameter, reject...
This code executes as it should in normal operation. In strategy tester the value in the print statement for marginRequired is zero. Anything I can do to the system to make it come alive in strategy tester? Metatrader4 version 4 build 1090 19th May 2017 {it is a method of an object}...
I am using ChartOpen and then ChartApplyTemplate methods to execute an EA on a new chart from the current EA. Sometimes (about 5% of all cases and it seems completely random) this newly executed EA throws an "cannot refresh history [4073]" error when initializing. Once this happens, the strategy...
Hi, I made an arrow object for buy and sell orders and I use chart event click on these arrow to manage somes advanced functions. It is very strange because the area of click detection is not well fitted exactly on the arrow symbol but just next to. Do you know what could be the problem ? I try...
Is it possible to set OBJ_EDIT graphical component always on top? I'm currently able to show it on top for existing component ( for example it overlays a trendline ) but it doesn't work for new components ( the user is able to draw a new trendline which is drawn over the OBJ_EDIT component ). I'm...
Has anyone ever found a renko charts EA that fully automates the trading style? This would be very helpful. I have used google and I am not really finding anything. Thanks PIL
Hi all, my expert writes a Global Variable in this way  StringConcatenate(...,Symbol(),OrderTicket()); but when half position is closed on profit, the OrderTicket() is changed from the broker and the expert is not able to modify the Global Variable properly. Is there a way to rescue the link to old...
Hi All,  Been trying to get this code to delete a pending order. Basically I'm trying to set two pending orders, one buystop and one sellstop, and when one executes i want to close the other one. Trying to do it by naming them ticket1 and ticket2 as below but its not deleting any:       //if entry...
Hello. Is it possible to set array size dynamicly for an array like SomeArr[5][][12]? I mean first and third dimensions are known, but the second must be calculateted and set up.
Hi, Does somebody know what the order of tick numbers and position numbers (in trade and history pools)? Whether tick2 > tick1 => time of OrderSend 2 > time of OrderSend 1 ? Whether pos2 > pos1 => time of OrderSend 2 > time of OrderSend 1 ? I.e. are the ticks and position numbers generated in the...
Is the spread field in the strategy tester in pips or fractional pips? I can't find it in the documentation. For instance, on a pair with 5 digits should that parameter be set to 1.6 or 16 if you want to simulate a spread of 1.6 pips?
I want this soft ,but I can't find it ,anybody want to share it ?
Hi I'm new-ish to the MT4/EA coding world, although I'm capable enough already to code entry/exit expressions based on multiple indicators/timeframes, change SL/TP, pending orders etc I'm wanting to outline my EA/Trading logic out here and have some more experienced coders/traders pick it apart......
Dek3sQwa19
How to remove the dotted line that shows your opened buy/sell positions in the chart? It just gets too crowded on the chart when I add other lines and indicators and drawings and I can't see what's most important for me - the trend line.
Dear all,  can someone please help me upgrade my platform to be able to enter/exit trades with one click, and also move stop loss and take profit with just one click. 
i need Send only 1 order code int OrderInOneDay(int type) {    int Cnt=0;       int  totalHistory;          for (int i = OrdersHistoryTotal()-1; i >=0; i--)           {             totalHistory=OrderSelect( i, SELECT_BY_POS, MODE_HISTORY );             if (OrderSymbol() == Symbol() &&...
  Code mql4 (3)
Hi, I would need to add a line of code to the "pip value and spread" indicator which allows me to display the size to be used as a lever 1. Example: Cross to trade: AUDCAD Current pip value: € 6.72 Balance Account € 140,000 Lever I want to use: 1 Therefore .... Position Size: Lots 2.08 The operation...
Hi guys, After being filtered by Symbol, MagicN, Negative or positive Profit, is it possible to select the most recently closed order, I mean the last one closed among the others. Thanks for your help.
Hi there, I've been working on my first EA over the last few months and it's now working well :) As is inevitable, I'd like to add some ways of interacting with the EA that is not really covered by the properties dialogue. These would be inputs to enable semi-automated trading. I've spent quite a...
I have an indicator loaded on 13 assets, each tick processes a series of data in D1, H4 and M30. In 10 MT4 the behavior is the same but a MT4 inside VPS did not perform a certain passage. Is it possible that with all these assets the memory of the MT4 fills up generating a block "momentarily even 30...
Hi, Under my EA the order failed to open saying in log "Invalid S/L or T/P" while SL and TP are set to NULL, it happened in very volatile market and spreads were widened at that moment. 1 12:01:09.942 '11111': order sell stop 1.20 GBPUSDmicro opening at 1.32476 sl: 0.00000 tp: 0.00000 failed...
  Closed Orders (4)
Hello - I'm new to the MT4 platform. I had some pending orders that I thought were at a really good price; The price continued to fall and my orders were all closed (due to my margin). Since then (about an hour ago) the price has gone back up and I would now already be well above the 25% threshold...
Hi, guys! So I have this very interesting problem and dunno how to actually overcome it. Idea is this: someone buys EA that requires 3rd party integration (via WebRequests). Let's say I own this required 3rd party web service and I need somehow to protect my service to only allow web requests from...
Hi I amlearning how to program expert advisors. So far, it worked quite well. Last week,I started to create programs including orders. First Iwanted to test my program in the strategy tester which is included in MT4. Icould place Buy orders including SL and TP which worked fine. But the programalso...