MQL4 and MetaTrader 4 - page 333

To post a new topic, please log in or register
Can I do this ? I want all of this || all of that if((Alow()!=0 && Bhigh()!=0 && Bhigh() - Alow() >= minABrange*pips2dbl) || (Ahigh()!=0 && Blow()!=0 && Ahigh() - Blow() >= minABrange*pips2dbl)) I mean will this compare the entire left side and right side entirely ? Or will is stop after the first...
When you open an indicator code file, you can see both 'tick_volume[]' and 'volume[]' defined in OnCalculate().  You can see "const long& volume[], // Real Volume" in the help for OnCalculate(). May I understand the value returned from 'volume[]' is the real volume instead of tick volume? Or...
Hey, I am making a MTF indicator to show static moving avarage from D1,W1, and MN1 timeframes in H1. Somehow I got it works for D1 and W1 periods, but I always get "array out of range" for MN1 period. Can somebody help me to find the solution for this problem? Thanks int counted_bars =...
  code help (1)
I need you to help me on code to select all account deposit from trading terminal. i want to use it to calculate account growth as (Equity/Deposit)-1
Good morning  I test my EA on the strategy tester with EURUSD , and it works , but when I test it with another symbol , it shows me a huge number of error , I try to close all the windows in the metatrader and restart it and try with another symbol ,it works , what confusing me , why didn't work...
//+------------------------------------------------------------------+//|                                                       bgColorChanges10_20_30_40_50.mq4 |//|                      Copyright ?2009, MetaQuotes Software Corp. |//|                                        http://www.metaquotes.net...
Hi there, I'd like to import tick data from https://pepperstone.com/mt4-forex-trading/mt4-tick-chart-history-data.php which is in the below format. EUR/USD,20090501 00:00:00.365,1.32436,1.32451EUR/USD,20090501 00:00:00.371,1.32437,1.32452EUR/USD,20090501 00:00:00.605,1.32439,1.32454 MT4 exports as...
Hallo, imlooking for a code that allows me to search trough the accounthistory andselects the last 30 trades that a particular EA magic number 66666 has made. Can anybodyhelp me please?   KindRegards   Rene
  Input box (Win32) (16   1 2)
I've been searching around the net to find a definition for input box (just like MessageBoxA is defined in WinUser32.mqh).  Does anyone know how input box can be called using DLL references or any other means? Thanks in advance!
  I need a help (1)
Happy new year and plz someone help me Is there anyway to help learning how I analyzing what in my idea good
I found this remark for Hour(): The value returned from Hour() will not change within the time of the programexecution and it's the time of program start. Then please help tell how to get the latest hour of the MT4 server! Thanks and happy new year! 
Hi, I want to close when order runs with +20 pips i would like to close running order % of order partially with some profit. eg: lot size: 1 lot partial close parameter is = 50% so when order is running above 20+ profit pips i would like to close the order partially 50% of lot size. according to...
Hello friends, I want to share with you my thoughts: I can see different way of using the RETURN operator:  I understand bool/double/int/string functions that returns a value. BUT why void function uses RETURN or RETURN(0)?  What it the diffidence?  Thanks. 
Here's a handy script I use all the time. It draws referencelines every 10 pips to help me gauge movement in the market. I was reallyfrustrated trying to figure this out by looking at the prices on the right-handside of the screen so I created a script. The script could be a good for beginners to...
Gan aku mau tanya kenapa ya aplikasi mt4 untuk lumia 520 tidak tersedia.....
MQL5.com web site is down for more than an hour - does anyone know why?
Question... Does anyone know if it is possible to "Lock" the size (specifically the height) of an indicator's separate window to prevent it from "scaling" when either maximizing the main chart window, or perhaps opening and closing the terminal window? I have created a simple indicator that is...
Is there any specific reason why this happened, is it to do with some sort of update? It's a real pain because I'm constantly streaming my trades. 
Suppose I draw a trendline, and I want an indicator that can draw lines above and below it by x pips. So I first find the trendline, take its price and time values, and calculate slope, then plot the lines. However, certain instruments close early on fridays and open later on mondays, so even though...
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...
kitgain
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...