MQL4 and MetaTrader 4 - page 123

To post a new topic, please log in or register
why these candles appear in meta quotes demo account ? is it normal ? but we test many EA on this account and we found much differences when we  use another brokers one
Hello everyone, I'm looking for a function in MQL4 that returns a color of a specific indicator's buffer. Something like PlotIndexGetInteger(plotNr,PLOT_LINE_COLOR) in MQL5. I know there is a constant indicator_colorN but if I change the color in the input window (tab colors) the indicator_colorN is...
I'm testing an EA in the strategy tester. To get a graphical representation of it, I also added an indicator, a simple indicator that warns me when the bid price breaks the lower or upper limits of a donchian channel. In real time, the indicator works perfectly, but in the strategy tester the...
Hi, Hi need to preserve a string variable from reset when I change TF. GlobalVariableSet is not a solution for me because I need to apply more times the same indicator on the chart with different properties, so to work correctly the GlobalVariable should have a different name for each indicator...
I want to backtesting my EA with the period of weekly or monthly, but I only can find the period selection only from M1 to Daily !
Hi all, I have a custom indicator and I build an EA from it. I would like to know is there any chance to put the indicator into the EA so I would be able to sell it via the market? Iam not talking about the iCustum function, I already use this to use it with my terminal, but nobody would be able to...
Hey all! Does anyone know of an effective way that I could extract the trade history from strategy tester after it is complete, into excel? I am currently doing this manually at the moment, but is a very long process when I am back-testing on 20+ pairs... Is it possible to use Macro's within excel...
Not sure whats going on, adding one makes it an empty controlled statement. Help please. double lastClose;//+------------------------------------------------------------------+//insuring its a new candle function//+------------------------------------------------------------------+bool...
Hi, Im backtesting my strategy under different TP/SL and indicator parameters (as period), so i run a backtesting, i take note of results, then i change my code (TP for example) and run it again to compara with previous results and get optimal profit parameters. I was wondering if i can configurate...
Hi friends, I usually need to change my indicator extern variable's value in order to change my indicator setting and redraw the indicator with the newly set variables. Now for the purpose of saving my time, I'd like to use the objects to change my extern variable's value by only a simple click on...
Hi Is there any way I can hide external inputs and set them to false as default? It will be much easier than modding code. I dont want the customer to see these in the inputs.. but i still want them set to false. extern bool PA8=false; extern bool PA50=false; extern bool PA200=false;
I want to scan the history of the trades to check if I had 3 consecutive wins or 3 consecutive losses  I wrote a code and this one scan only the last two trades even if I increased the Bistory and make it equal to 4 or 5   extern int     Bistory              =3; int...
I've been reading mql4 documentation, but I still don't understand this well. If I set the period to one hour, does ontick event run every second as the name tick indicate or does ontick even run every hour as I set in the period? Sorry for the stupid question, I'm not really good at this.
  Previous tick's value (39   1 2 3 4)
I, a custom indicator, just got a new tick and am currently in Start already. I need to find out whether I am to move up from the previous tick or down. Where do I fetch this information?
  MT4 History (2)
Hey, guys, what's the difference between ...\tester\history and ...\history\BROKER? I ask this because the archives located in ...\tester\history have more than 200GB!
Hi folks!  I was wondering if there's a way to create a custom Drawing Tool for Metatrader 4 (or 5); concretely something like R:R ratios, Harmonic Patterns, etc. I know that reading in depth the documentation something will come up but I also wanted to know if someone already tried and succeeded....
Hi, how can i change position of this? ObjectCreate("HEADER",OBJ_RECTANGLE_LABEL,0,0,0);ObjectSet("HEADER",OBJPROP_CORNER,1);ObjectSet("HEADER",OBJPROP_XDISTANCE,270);ObjectSet("HEADER",OBJPROP_YDISTANCE,30);ObjectSet("HEADER",OBJPROP_XSIZE,260);ObjectSet("HEADER",OBJPROP_YSIZE...
Hello, This is my 1st time purchasing an indicator from the mql5 market. I have a demo mt4.  I have the checks on authorization, selection, payment, and confirmation. The "end" does not have a check. I have my demo mt4 up and when I go to login to mql5 community, nothing happens. I enter the...
I have done a great EA which gives me excelent results when simulating on strategy tester of mt4. On real account it doesn't give me the same results...
I've got OrderSend 138 only if I run it in tester, not in live demo. I've try to adjust slippage point to no avail. Anyone get any idea why this happen? double price = iClose(Symbol(), PERIOD_H1, 1);   if (up > down && up > sideway){      double stoploss = NormalizeDouble(price-piploss*Point,...
Thanks in advance, once open Buy order, current stoploss is 100 point, take profit 200 points. if price moving up, how to modify the stoploss moving up accordingly. thanks
  Limit Value (5)
Hello, How to limit the output which has results between some range values (for example): 240 < outputvalue < 250. Anyone have an example please? I am trying with this code, but give no result: int NumberLimit = 1double outputvalue;for (int i=0; i<BarsLimit; i++){    int...
There are several reasons why an order was closed:         Unknown = -1,         Expiration = 0,         Market = 1,         TakeProfit = 2,         StopLoss = 3,         Risk = 4 In MQL 4, how does one determine why an order was closed? How does one determine if an order was closed by Market,...
I am trying to read the values of different Buffer from the CCFp indicator but it stay constant at 2147483647  (Empty_value)  Here is the code I use to test it :   Print(handle);  if (NewBar()){   double USD = CCFp(0, 1);...
  Neuro Shell Trader 6 (11   1 2)
If anyone has experience dealing with Neuro Shell Trader could you please give me your honest opinion. I purchased the program about a month ago and I am not to pleased with trying to generate new trading strategies. I feel as If they do not have enough instructional videos and also a lot of their...
Hi Community,   after I installed a new instance on my brand new laptop I realized that opening a chart directly from the Market window (via Ctrl+Click and drag onto the 'work area') does not load the chart into a new window but rather it replaces the one in the window which has the focus. As I seem...
As a newcomer to the forum and also to MT4 and to MQL I would first like to thank you all for sharingyour knowledge and experience, your trading tools and ideas. This first post of mine is a question about text labels. What I am trying to dois to have a table with indicator values regarding multiple...
  Copy a signal (1)
I want to copy a signal (it's a free signal) and it's not showing up in MT4 when looking in the signals tab. I have tried to sort it by name, but it doesn't show up. So I open up the mql5.com website and look at the signal and there is a button on the left saying "Copy for Free". But then it should...
Hi .Please could any body help me out in writing mql4 code , starting from x date  (ie 2017.09.08 00.00) i want to draw vertical lines every x period of hours excluding saturday and sunday ,this should go to the future also.  It would be highly appreciated , im using mt4. Thx in advance.