Download MetaTrader 5

MQL4 and MetaTrader 4 - page 230

To post a new topic, please log in or register
I am getting a confusing issue with MathFloor() function in mql4. Print(MathFloor(11219.0)) gets displayed as 11219.0 but Print(MathFloor(10000*1.12190)) gets displayed as 11218.0? Any idea, why?   
Hello, does somebody know if it can be stored the value of a reference parameter which passes a dynamic array reference. Example: class AAA {    ??? Buffer;    void method_A(const double & buffer[])    {       Buffer = buffer;    {    double method_B(int idx)    {       return Buffer[idx];    } };...
Hello there, May I know how to install the custom indicator & EA to the new version of MT4 build 600? I was tried to install to the custom indicators to MetaTrader 4 directory under MQL4/ indicators, and re-open the MT4 platform, under custom indicator, I won't be able to locate my custom indicator...
hi i want add 4 seconds to server time or market watch time to CHANGE OPEN and CLOSE of CANDLESTICK BARS in 1m chart and other how i can do it   the result is if your ea works on a broker like ic market so it can work on hotforex because hotforex 1m bars will open and close 4 seconds sooner
What is the simplest and most efficient way to  test if there is already an open position of a specific pair? This works but is there a simpler way? string Pair = "EURUSD"; if (OrdersTotal() > 0) { for (int iii = OrdersTotal() - 1; iii >= 0; iii--) { if (OrderSelect(iii,...
I thought it would be a good idea to have a central location for people to have a resource of information on the platform and programming similarities and differences between MQL and MT 4 and 5.  I was going to originally start just a thread for discussion, for people to post things they have...
  Trailing step (3)
Hey guys, I am trying to make a trailing step. Essentially like a trailing stop, but instead of moving the stop loss every point in profit, it only moves the stop loss after X amount in profit. Below is my code (tries to modify as soon as order enters and I get a constant OrderModify error 1):...
Hello everyone, I'm a new member. These days I am considering different strategies, I'm looking for an indicator that I consider the body of the candle. I do not know if it's possible, but I wish the indicator tells me while the candle is still forming, that is, if the candle reaches + 50pips for...
Hello, I'm looking for a T3 Tilson Indicator. I have seen some variations, working with MACD or RSI, but not just a straight T3 Tilson Indicator for MT4 that uses just moving averages. I didn't want to re-invent the wheel if it's already out there. If someone can point me to one, I'd appreciate it....
Hello, I am writing a script to loop over each day and collect certain data points like ATR(1) dependent on the day of the week and write it into a multidimensional array. So that I can do calculations on this array like the average ATR of all mondays and output the data into a csv file. So far so...
can anyone show me how to call renkomaker.ex4 into EA using icustom like the following custum indicator SuperTrend. //+------------------------------------------------------------------+ int signal()   {    int signal=2;    if(iCustom(NULL,0,"SuperTrend",10,3.0,0,bars_closed)!=EMPTY_VALUE) signal=0;...
Why would I be getting error 130 (invalid stops) when I'm not even using a stoploss? The ordermodify function I used just uses OrderStopLoss() to set the SL when the order is modified to add the TP.
Hello, I need some help please. I want to make calculations in my EA from more than 1000 bars then starting strategy tester. It seems 1000 is the limit, no idea why this number is set.... The best answer what I can find was to let strategy tester print more bars and then allow your EA to work....
Hello folks,   I'm building an EA that must place a trade at the beginning of a new bar. Regarding to less time delay from the opening time of the new bar, which one is more recommended to use: OnTick() or OnTimer()?
Hi, Anybody knows why the examples of indicator or expert given for instance in <Indicators/Examples/SimplePanel> show a panel but can not resize it?   Thanks 
Hi, I have an array of CButton and I want to handle an OnClick event on the right button index. I try to use ON_INDEXED_EVENT  this #define ON_INDEXED_EVENT is defined in <Includes/Controls/Defines> it searches an array of controls but it returns handler(i) when as I understand is inside a bool...
I have a simple EA that takes and closes positions based on a grid. When running, i cannot change the timeframe of the Chart it runs on (e.g. from 5m, to 15m) withouth the EA DiInit-ing and re-Init-ing. Since my EA is completely independant of the timeframe (not an indicator of any sort) I'm...
Hi Coders, I'm looking for RSS reader example (souce code) what is MT4 Build 600+ compatible. (Sorry, but I can't use the forum search. It doesn't work - don't know why. I tried to search on Firefox and on Chrome browsers too.) Thank you in advance. Relative
ok, I try to write  an EA,   expert uses iCustom to get some values from Indicator1, Indicator1 calls Indicator2 for some cals all objects are in standart MT4 folder bu got error  like  Indicator1 : Error! C:\Program Files (x86)\MetaTrader\experts\indicators\Indicator1.ex4 cannot be found.    why it...
hi dear all, is there any one can help me figure out why i can't close order on mt4?  and it shows error code: EAQ WARNING: failed to close ticket #xxxxxx..... what happened? do appreciate if anyone can answer :)
Can anyone tell what is the best coding for taking trades only in the first 5 (or x) seconds of the current/new candle? Any help aprreciated! Thanks.
  Tick Prices (4)
Hi,   May I know how to write the coding  to find the diferrences between the current tick price and previous tick price?  Regards 
i want to delete the information from txt every tick how can i do this
Hi every time i start mt4 it restart my pc and gives blue screen with error :  STOP: C000021A {fATAL sYSTEM eRROR}  The Windows Subsystem system process terminated unexpectedly with at status of 0xc0000005 (0x7c9106c3 0x0069ec24) i am using windows xp service pack 2  , 64 bit any suggestions to fix...
Hey guys, I'm trying to program an EA to trade based off of bollinger band breakouts. Once it hits the TP it will immediately open another trade if the initial conditions are met for opening the trade. I'm trying to make sure that the trend goes back inside the range of the bollinger bands before...
//+------------------------------------------------------------------+//|                                              M5 Bar Alert.mq4  |//|                        Copyright 2014, MetaQuotes Software Corp. |//|                                              https://www.mql5.com...
  Bar values (7)
Hi, is it possible to get bar values (open,close,high,low) of a bar at which a position was opened.
like we add default order lot in tools>>options/trade i would like to add comment on all my new trades. currently i apply everytime when open new order. is this possible to save comment for future orders?
Using MQL4, how can I get the profit / loss for the most recently closed position for a specific pair?