Download MetaTrader 5

MQL4 and MetaTrader 4 - page 99

To post a new topic, please log in or register
Right click chart window > Properties > Common > Scale Fix One to One I assumed this chart feature is new, possibly in the latest 1010 build of MT4.  I have always had issues when I leave my charts unattended, I come back and the market has made a huge move up or down, and the candles are partially...
Hi guys, here i am again to ask you an help. As in subject i wish EA close trades after X minute if position is in loss. So i write the following code: void exitloss(){  int ExpireX=60*MaxHour;   for(int cnt=0; cnt<OrdersTotal(); cnt++)      {        if(OrderSelect(cnt,SELECT_BY_POS...
Hi   i'm trying to create a virtual multi-currency backtesting tool in MT4.   I have an issue with iMA(). as far as i know, iMA uses Close[0] in its computation, meaning the tick data, but when i try to compute iMA on other pair than the one selected in the Strategy Tester, i have constant outputs...
I am using SMA 50 and SMA 200 on Daily Time frame. I want to use the same SMA 50 and 200 values from opening 15 min time frame. Is this possible? if yes, please let me know the exact value for 50SMA and 200 SMA? Thanks in Advance!
Good day, I'm beginner in MQL 4 and building my first EA. I want that the EA will buy or sell everyday from 9:00 to 10:59 depends on High and Low of H1 candle starting at 8:00 same day and sell it if it reaches the stoploss or profit target. It is actually working in that time, but sometimes it is...
Hello guys, good day all. I want to assign economic data to a variable as soon as they are released in order to incorporate same to my auto trading strategy. By so doing I want to be able to program my EA to either buy or sell when a number of released economic data meet certain conditions. This is...
Hi ,   I work on EA and I block and I hope your help how to find the maximun price between the point where it hit take profit level  and the stop loss level  as shown in the picture thank you very much    
<Spam content removed>
Please help add text to the line on the right side. Thank you in advance for your help.  
Hi all, Which broker provides the furthest historical data? i am using a broker now but it only provides till year 2000 on Monthly time frame. Thank you!
Hi guys, This code #define N_ARRAY 5   int myArray[];   ArrayResize(myArray,N_ARRAY);   Print("Before: ",myArray[0],"/",myArray[N_ARRAY-1]);   ArrayFill(myArray,0,WHOLE_ARRAY,7);   Print("After: ",myArray[0],"/",myArray[N_ARRAY-1]);  gives 0/0 in "After" line. But this code #define N_ARRAY 5   int...
Hi guys, i'm new and I need your help. I'm writing an EA and I want close position at market after xx hours (maxHour value) if i'm NOT at breakeven..So i wrote like this (long example) for (int i = OrdersTotal() - 1; i >= 0; i--)         {if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES))...
Hi,   I have this MT4 indicator that shows me Open to High difference at top of the candlestick. What I need is that it should also show me Open to Low  difference at the bottom of the candlestick. Is there someone who could do this for me and may be suggest an Indicator that already has this...
I have an EA that only works on H1 timeframe, is there a way to: - Automatically change timeframe to H1 when EA is attached succesfully to a chart? - Disable the abiility to change timeframe while the EA is attached to a chart. Thank you very much!
Hi, İf I use ordersend via EA. I take 4112 error. Is there any way to hide auto trading from server. So server would not be unerstand that trade process is from manuel or auto
Hi   I use Rate of Change ( RoC ) in my trading and have recently had to delete and then reload MT4 to my pc due to some issues I was experiencing with my PC.   However since then, when I draw trendlines over the RoC in the bottom pane of my chart the trendline only stays for a couple of seconds...
"I've learned more about online trading of forex and stocks through Ask Mario Singh blog. He personally answers questions daily and give great insights for anyone to learn stock market easily. You may want to check him out. Edited by moderator: Please respect the rules : "Posting of advertising...
Hi For real trading the answer is obvious - fixed risk per trade, but what with backtesting? Wont it distort the results of EA? For the purpose of rating the EA which method is better?
Hi, I'm sorry if this is stupid question, but I'm new to coding. Does the code I write in MQL4 is read by MT4 in the order i write code? I`m asking this as I have 2 peaces of code contradicting one and another. But wondering if in this case the last code will be used over the first one? Here is the...
Why does an empty dynamic array, on a 1 day EA with a 5m timeframe produce > 80k element with this code?  Is it always linked to the amount of bars on the chart? Because I don't want that. I just need the Series functionality to catch the latest 3 zigzag values.    // I've set my_array[] on top and...
  Peak & Trough (2)
Hi guys,   I have Metastock formula and I'm try to convert it to Metatrader4. The problem is I could not find  Peak, Trough functioins on metatrader4. What these function named in metatrader, or How to convert these functions (Peak, Trough) from Metastock to MetaTrader4.    Regards, 
how can i use mql to run extern ".exe" program? thanks everyone
New article Graphical Interfaces VIII: the File Navigator Control (Chapter 3) has been published: In the previous chapters of the eighth part of the series, our library has been reinforced by several classes for developing mouse pointers, calendars and tree views. The current article deals with the...
i have downloaded mt4.exe..but while i start to install download files completes upto 18386kb and shows and red marked error and installation is not completed.what should i do now
Hello,  I have this code which draws VLine. datetime N = iTime(Symbol(),PERIOD_D1,0);for(int ml=0;ml <96; ml++){   MTemp[ml] = rv(A + (fixed Data * ml));    for(int pl=0; pl < 9; pl++)    {            double Ap = MathAbs(MTemp[ml] - PTemp[pl]);              if(Calculation)...
Hi there, I've found that backtesting can require huge data sets and my C drive ran out of space. I bought an external hard drive thinking I could install MT4 on it, as well as download the data sets to it, and that this would be the best way to strategy test with Birt's Tick Data Suite. After...
Hi Guys Is there any way that I can check the value of a variable while I am working on my code - like some kind of keystroke (Ctr+Alt+something) that will display the variables value...??? It would be quite handy... I usually simply display the variable in a "comment" and then run the EA to see...
Have my own EA which I have running on the Major charts including the USDJPY.   My EA creates a log file which writes loads of data but I can't fathom out why every time a USDJPY order is initiated I appear to get 2 orders generated (with same S/L & T/P and consecutive TICKET numbers). The scenario...
Hi, Does anyone here tried to create a function that returns an array? Instead of creating a function that returns ticket number, open price for a specific logic, store all of the necessary data on array returned to a function. Thanks.