Download MetaTrader 5

MQL4 and MetaTrader 4 - page 258

To post a new topic, please log in or register
Hello everyone, I am recently trying to predict MACD signals and i think its going well. the problem is that i want to draw it in the indicator window but haven't been successful so far. So consider i can have all the candles needed in order to calculate the iMACD(NULL,0,12,26,9,PRICE_CLOSE...
Dears,  I have been using this indicator in the meta stock and I am satisfied of its results. Can any one help me find out how to program with MT4. Your help and support are highly appreciated.     The indicator mainly takes the DEMA (Double Exponential Moving Average) of 100 then filter it more...
Hi Gentleman, I am confused when I change the direction of for recycle from {i=0;i<limit ;i++} to {i=limit;i>=0;i--} or {i=limit-1;i>=0;i--}in a indicator main loop, the result are not the same, while the last indicator show more late than the previous one. Here are the codes, The  previous one...
Hello,   I want to change the indicator for Renko candles only based on changes in PIPS and not on a time basis. That is to say, do not wait until the candlestick closing for the Renko candles are built but they are built gradually as the PIPS evolves without considering the candlesticks.   I do not...
Hi, I am creating an EA but I have a problem. I created two functions to close all opened positions Buy and Sell , but I do not understand why sometimes not all positions are closed by running this code: //------------------------------------------- //  this function close all Sell positions...
Dear mql4.com users: I want to know when an array position of a object pointer arrays han no pointer in int. MyObject *Objects[3] Imagine we have 4 objects inside this array And the we delete Objects[2], and made a loop trying to find the position without pointer. for(int i=0; i<4; i++)...
In TF-H4,How to write code for get first happen between high or low?
I need a script that allows me to put multiple sellstop or buystop from a price chosen by me and distance of 5 pips from each other without stoploss or take profit.
Wishing everyone well for the holiday season and new year. I have a question re testing my code in Strategy Tester.  My EA has positions that regularly remain open over several days.  Is it possible include swap prices in the testing of my EA?  Otherwise how can I know if my EA works despite swap...
Hi everyone, I just suscribed a VPS yesterday, but I am struggling with installing a MT4 platform propperly.  I have tried to install it either in C:\Program Files (x86)\MetaTrader 4 or directly in C:\MetaTrader 4, but in both cases folder MQL4 with subfolders Experts, Indicators, etc is not there....
Pretty much as it says in the subject line.  I found a supply and demand indicator online that draws rectangular supply and resistance boxes on the chart.  I want to use these levels as take profits and stop losses for trades opened in an EA.  How can I access these indicator levels in this EA?
With the following code, I can place a dot at the bottom of a candle, for a specific value.  I would like to place a second dot below the first, for a second value.  Can anyone show me how to accomplish this?  I would also like to know how to add spacing between the first dot and the candle, so that...
Hi guys, I am looking to implement a "hedge" strategy on an already existing EA. This EA works great when I set it to trade only in the direction of the trend. Identifying trends with a 200 EMA on a 4 hours chart. The problem is that occasionally during corrections of the trend the opened positions...
  Help with code? (16   1 2)
Hello! I would like to write an EA which will set pending orders. I will set pending orders manualy. Let's say at 1.3000 BuyStop and 1.2950 SellLimit (curreny price is below). When/if pending orders are reached nothing happened. When pending order close at TP or SL, EA has to place same pending...
During EA testing, I find critical issue and later found the root cause is lotSize is high. Then checked the value returned from "MarketInfo( Symbol(), MODE_MARGINREQUIRED )" is '5' for EURSEK. I understand the margin/lot should be much higher than 5. How does the EA get 5?  May I ask a favor for...
  data issue (1)
hi i have indicator which gives me tick buy and sell signals. i would like to back test this indicator and i am not sure how to extract the back data  could any one of you assist gratefully figaro
Does anyone know how you can choose the location on which you write in a CSV file? I only know how to write at the very beginning or end of a file. Plus only in the first column. I'm using this piece of code:   void WriteNewEntry(string Name, string Message ){   int handle=FileOpen( Name ,...
i test the WebRequest() function on some public domains,such as www.google.com www.mql5.com works very well.   but when i use it on LocalHost domians,it doesn't work anymore.   i did add localhost domain in the EA tab of option menn. 
Hello   Being completely new to the MetaTrader, Iam trying to understand what it takes to create an email alert based onstochastics/price divergence (divergence=price makes a Higher High, butStochastics makes a Lower High). The idea in a nutshell: indicator scans/monitors price data + stochastics...
Thanks for reading this. My goal is to have the code run in the background unaffected by me changing the time period (M1, M5 etc.). Right now, once the time period is changed, the code gets restarted from the top and my whole "Counter"-logic (see code below) doesn't work. Goal of the EA: check all...
Hi,  i was coding a History CSV Analyser for here offered Signals. I found following issue which might cause possible problem :  First screenshoot:   Explanation: Exit Date is earlier than Entry Date. I personally thing the Date should be next day (probably) but the stamp is from first day. See...
int total;    total  = OrdersTotal();     for(cnt = 0; cnt < total; cnt++)      {        OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);        if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) // Isn't it a less than, equal to sign?          {            if(OrderType() == OP_BUY)   // Why...
Hi everyone, I was wondering why this array initialization won't compile.    const int ORDERS = 10;   int orderTicketArr[ORDERS];  the error is :  invalid index value I would like to set 10 to a input variable but I can't even get it to work like this.  any help would be much appreciated   thanks 
Hi, i bought VPS server with Ubuntu on board and i have a problem right now. MT4 is working fine but notifications are not. In the logs there is:   2014.12.23 21:00:55.339    Notifications: 'Test message from 'xxx', 'Trading Point Of Financial Instruments Ltd'' sent to '3xxx' Notifications: failed...
Hi everybody! I wrote an simple script, that can not work. It should find the first candle of  Wednesday from right to left on the used time frame etc: PERIOD_H1, but it can not work and i dont know why. This code is so simply and am i so idiot i can not write it?? :) Please somebody help!   Thank...
Hi, I made this code to create increasing gaps between next orders. Can someone help me understand how to compact this?  Thank you as always I appreciate it. (ps i intentionally left out index 0 in the examples) void gapsteps()  {        double firstgap = GapBetweenOrders * .0001;     double...
Hello folks, as I have seen through the trade mt have made in the tester I found something I did not really understand:    if(Close[1] > ma) If this is the case a buy order should open and if Close[1] < Moving Average the Order should be closed. But this happened:  the Bar before Entry: Close 87.530...
kamal_fx
Hi i have a problem with my strategy tester when i begin testing my experts , it will get new position every minutes and close all positions with 1 or 2 pips does anybody know what is the problem? thank you
Hi Guys, are there some "traps" in backtesting on mt4 tester? Some things only working in the tester but not on live mode? Ideas are welcome.
Hello, I want to do completely automatic backesting using initialization files. I used to have a solution for this (using wrong log in data and setting "AutoConfiguration" to false) but it stopped to work. My main problem is that I am unable to prevent Metatrader from popping up windows asking me to...