Download MetaTrader 5

MQL4 and MetaTrader 4 - page 270

To post a new topic, please log in or register
Hey guys,  I am in need of assistance please. What I would like to do is every time price creates a new high or low for the day I want to be able to save the price and the time somehow (perhaps in the global scope) to use it as a reference point? Would anyone know how to do this? 
I wrote a custom indicator that finds the swing highs and lows. Currently it puts an arrow object point to the price level and the time bar.  Green for High and Red for Low. I would like to change it to text that shows a count variable. Here is a portion of the code I created but it isnt showing the...
My initial balance is 1000 USD Risk per trade 30% Stoploss 2000 pips for USDJPY 122.622000 How do I calculate Lot Size?    
Hi, I have a class that holds a dynamic array of pointers to types of subclass of another base class. It has a method that accepts a reference to a certain type of the subclass and I need to know if  it already has a saved pointer to that type of subclass. Is there a way doing it by the pointer type...
Is it possible to change the location and the colour of the comment that is displayed on the chart through Comment function or ChartSetString(with CHART_COMMENT)? By default, it gets displayed in white colour on top left corner.   
Hi all, i'd like to ask if it is possible to enable Metatrader default Trailing Stop in an Expert Advisor 
Hello everyone, I was little clarity on how OnTick()  works. I am trying to check if a new bar is forming  void OnTick()  {//---  int m_nLastBars=0;  int m_bNewBar;  int nBars=Bars(Symbol(),PERIOD_M15);if(m_nLastBars!=nBars)  {   m_nLastBars=nBars;   m_bNewBar=true;   //////run my logic hereafter  
Iam using mt4 on my ipad to trading forex. And mt4 is a great app ever. But now i want to add some custom indicator to my mt4 for support trading. And how i can do that? Can you help me?   Thanks. 
If I use the function iClose with a Shift == 0, will its value be changing as the price changes while on the current bar or will it wait for the close of the current bar? But then the value wiill be the same as iClose with a Shift == 1?
Hi,  I am new to MQL i needs to find a way to get alert when market moves inside a range.   Ex : when the last 10 candles high and low is just less than 20 pips. High : 1.1250 Low : 1.1230   Appreciate someones help.   Thanks you
New article Tips for Selecting a Trading Signal to Subscribe. Step-By-Step Guide has been published on mql5.com: This step-by-step guide is dedicated to the Signals service, examination of trading signals, a system approach to the search of a required signal which would satisfy criteria of...
Hello, I have find a good indicator, but it have a problem 'Low' - constant variable cannot be passed as reference That is the global code : //+------------------------------------------------------------------+//|                                            sp market profile.mq4...
Hi,  I'm trying to run through a number of files that are located in my FILE_COMMON directory. In this directory I have the following structure NTOutput\Handled\ NTOutput\OrderTickets\ NTOutput\Pending\ I would like to look in the OrderTickets\ folder and show all files that are located in this...
pls guys can you please suggest what could be the cause of this, my ea is programmed fine and all braces properly placed with error report. back test/live work properly and on trade for long time successful no problem,but today i suddenly saw multiple of order open by my ea. however i use trade...
Hey Guys,   i have some programming knowledge so i thought i'd try to code my first own EA, i have an OrderClose Error 138 (yes i do know what it means) Issue tho in the part that i commented out, i just dont seem to find the Error though. Maybe someone of you guys will see it in a heartbeat so i...
Hello i have made a ea from a custom indicator.I just do not get it working. It is an EA for binary options in mt4 . It is intended that the trade remains open for 15 minutes and then closes automatically. It is for 15min time frame .I would love it if someone could help me .Below I put the source...
Is there a built in function that compares "a" bar to the last "x" number of bars? Example if high of last bar is higher than any high in bars 4 to 15. Thank you. 
hi guys ,I have a mq4 indicator i have bought it with 100$ I just wanna add some alert code to it ,I need a programmer ,is there any someone could help me on that ? :'(
The Metaeditor help states you can run a compiler downloadable from: •https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mql.exe — 32 bit version. •https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mql64.exe — 64 bit version. That compiler is started from the command line...
Hi guys... There are a way to use iRSI() function to get data from past candles ? Not only for actual candle... if yes, how can i do that?
How can I include % in StringFormat() function? I was trying this instruction to display % sign after the stopOut value: string msg = StringFormat("\nA/C Stop-Out: %g %",stopOut); But, this instruction is not displaying any result.  
Hi  Is there a way, wherein any desired EA (or script) may be attached to the chart (or executed) among a given set of compiled EAs (scripts) by executing another single mq4 program? Thanks
Hi How may I include a formatted (say float type) variable's value within a string variable? Thanks in Advance 
Sorry for asking such a silly question but I can't get the moving average number correctly with my code    //+------------------------------------------------------------------+ //|                                                           me.mq4 | //|                        Copyright 2015,...
Hello,     I'm working on it fibonacci retracement and i want to give names to the horizontal lines with label. How can do that?   Thank you for helping.    
Hi all, I have a problem with mql4, I'm creating a script and I need to create an array of a my class, if I declare the array before start function (outside of each functions) the array will be not created and the compiler launch an error. Then I tried to create a function which uses an parameter of...
Hey guys,  I send 2 orders at the exact same time, yet one returns this error and the other gets placed just fine. Any reason why this would happen? int buyMA=OrderSend(Symbol(),OP_BUY,Lotsize,Ask,3,Ask-(StopLoss*Point),Ask+(TakeProfit*Point),"Buy order",MagicNumber,0,clrBlue);  if(buyMA>0)...
Hi folks! I'm start to learn basics to construction an Expert, and it's going well so far. Eevery day some options become clearer and easy to understand, but others, not so much. Need to know how to detect the exact moment when a candle is closed... and otherwise, also when a new candle starts. Need...
The code: int candle_time_left = current_bartime + entry_signal_period_seconds - TimeCurrent(); gives warning with #property strict How should I programm it correct? Any help appreciated !