MQL4 and MetaTrader 4 - page 279

To post a new topic, please log in or register
I need help modifying the ADX in MT5. Currently, the only parameter allowed to be entered by the user is the number of periods for the ADX. I need the ability to input a different time periods for the DMI. Basically this would mean having the ability to set an 8 period moving average (ADX) of the 13...
I have read several posts in other threads about Moderators being selective in certain things. And I constantly see regular Contributors bashing those who are new, albeit some of it deserved in my opinion. I have also seen some regular Contributors just disappear because of all this, I assume. What...
Good day all. Any suggestions for mt4 charts not loading their template contents?  On startup or on switching profiles, charts come up without their template contents.  It's a problem which occurred fitfully years ago but is now systematic for m1 charts, occasional on other timeframes.   If I...
Hi    I met a problem when writing indicators. The indicator works fine in normal conditions but if there are some new data loading, the indicator markers and zigzags becomes messy like show in the following image.  https://charts.mql5.com/8/221/usdchf-m15-forex-capital-markets.png   Any help please...
Hi traders i am using mt4 demo version and trading forex. I have an issue with delay response on my profit limits. Today it happend multiple times that the platorm didnt get me out after i reached my profit target. Even if i move the profit target in some direction to refresh it mt4 just did not...
Hey guys, Does anybody have a function that increases the lot size by a certain amount when the account balance increases by a certain amount. Eg. If the account is initially on $2000 I want it to trade on 0.2 and when the account balance reaches $3000 it must start trading at 0.3 etc. Thanks! 
Here is the code int start(){   double BuyTP=Ask+(TakeProfit*Point);   double SellTP=Bid-(TakeProfit*Point);   double lots=(AccountBalance()/10000)*Lot;   ArrowUp=ObjectFind("SignalUp");   ArrowDown=ObjectFind("SignalDown");   Strength=MathAbs(ObjectDescription("WPRValue"));      if(...
Just like the subject says, I can create an object fine in init but if I try it in start I get nothing. I'm playing around with the FX Multi Meter II code and was wondering if there is something that might be preventing it from being created but I can't find anything. I've tried it in all different...
I open a demo MT4 account on Windows 8. In Program Files/MetaTrader 4/ there is not MQL4 folder. I attached ascreenshot. Can anybody help me?  
Hello guys, I'm bit worried about how does MetaTrader and Expert Advisor works on multicore systems. I have an idea to run 1 MT4 (or EA) on one CPU. So if I want to run a 100 accounts thus I have to have 100 threads available. What shall I do, if I want to run metatrading system. How many EAs am I...
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...