MQL4 and MetaTrader 4 - page 131

I want to call buffer value from zone indicator , it is multitimeframe indicator. here is its buffer int t1; t1= 0 ; SetIndexBuffer (t1,BufferResistance1); SetIndexEmptyValue(t1, 0.0 ); SetIndexStyle(t1, DRAW_NONE ); t1+= 1 ; SetIndexBuffer (t1,BufferResistance2); SetIndexEmptyValue(t1, 0.0 );
Hi, I want to have iMA 200 period on iATR 14 period in MT4. I have written the following code but it returns 0 and I don't what is the problem. Any help is appreciated. MA200=iMA(_Symbol,PERIOD_CURRENT,200,0,MODE_SMA,iATR(_Symbol,PERIOD_CURRENT,14,0),0); Attached phot shows my request clearly
I have been using the following line: double ThisZigZag = iCustom(NULL,0,"ZigZag",12,5,3,3,0); in order to try to work out whether or not the indicator is going up or down but it just returns 0.0 (zero) all the time. I have spent all day trying to get some help and would welcome any suggestions.
I have the forex.com version of MT4. and when trying to set the Strategy Tester, I find that the Symbol drop-down is "jittery" in that it keeps updating the list and rebuilding it to the bottom of the list. This makes it hard to select a Symbol higher up on the list because the list keeps updating
This is one ive thought about many times, there are loads of EAs available for sale on here, who knows which ones are good, which are scams, which work sometimes etc. Does anyone trust their own EA to let me have a copy for an inflated price on the condition that I only pay for it after it has made
Hi! So I have been trying to implement a simple strategy, which I plan to develop further. The first step should work as follows: - buy at 23:30 and close at 00:05. I used a simple "if" function with "Hour", "minute" and "seconds", however it does not open any positions. Could you please help me
Hi! I try to create a strategy which works as follows: - open a Long position at 0:55 am with a very wide TP and SL - at 1:05 am change TP into the price, at which the current position was initially opened. Is this possible to create such condition? And if so, could anyone please help me with this
Hello,   I would like to print the number of the line in my code. For example if (condition1 && condition2){Print("Error in line ",GetLineNumber());}   where the function GetLineNumber() is a function the gives the number of the line where it is called.   Is there such a function out there?  Any...
[Deleted]
Hi all Error code 149 ("Hedge is prohibited") that is returned to a client at the attempt to open an opposite position to an existing one if hedging is prohibited But you need to try ordersend to know if it's ok or not ! How to know that in tne init() of an EA for example ? thanks
I have an indicator that adds values to the previous value of the buffer. My formula is: buffer[i] = buffer[i+1] + some_values Now the problem is after sometime when attaching the indicator to the chart, all the values indicator repaint. See images below: After attaching to chart: After sometime or
I have this value from a function MAXVALUE(). the value is less then 0.004. i need to show this value as it is; that is 0.004 and not 0 as it is currently shown. i've tried Normalize double and trying to multiple in the function then divide outside the function but the value is still 0. ideas
Hi, i have some important questions to ask about slippage in my EA (using ECN broker and low timeframe): 1) If i put an OrderSend() function it actually and set the slippage to lets say 20 fractional pips, that means that if wont go in the trade if the price moves more than 20 fpips before the...
Hi all, I have MT4 running with the same account on two laptops. On one of them the bid/ask "boxes" have disappeared - the two boxes on the top left of a chart that show the bid and ask in large font. Please see the attached image file. I have searched the settings and googled the issue endlessly
Hi ! So I created a simple Itchimoku strategy, with 5 iCustom functions. Unfortunately, although all values printed from iCustom functions work correctly, one "Itchim4", which is supposed to print a certain value of S&P500, prints "0" at the beginning. ( I have attached screenshot if these values
Hi everyone . I am learning MQL4 very beginner level . I had a code that did the following output on the chart window( first pic) . Learning from here and there I changed it so that the output is displayed on separate window and everything is horizontal instead of vertical as shown in the second
Hi, I'm (trying to) add this code into an existing program. If I compile it without the code listed below, it’s just fine. But no matter what I do with this section of code I ALWAYS get the same error '\end_of_program' - unbalanced left parenthesis . I've tried adding some in parenthesis, as well as...
  Various  (1127   1 2 3 4 5 ... 112 113)
In case some of you have been wondering what was the "wonder" indicator picture posted a couple of times in the digital filters thread, and, since rules for advanced elite section are a bit different : It was a MACD of a Hodrick-Prescott filter. One version of that indicator (Hodrick-Prescott...
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 OrdHistory = OrdersHistoryTotal ( )
[Deleted]
Hello all.. I'm going to make this as short as possible. When i came across a blog. I saw this trading screenshot and curious with the indikator that he use. Please help identify me what is the name of the indikator and if you could also provide me the information on where to get the indicator.
Can someone please tell me how to delete a group? I opened an MT4 chat group many years ago and have tried everything possible to get it deleted, without success. It seems one can create a group without a problem, add and delete members, but remove the group when it's no longer in use? Has anyone
Hey there ! I have a question on how to boost a bit the looks of an oscillator line that I coded - I was wondering if changing line colors based on price levels is possible - meaning the further it gets from 0 - the more it's color changes. Anyone tried to do that with MQL4 without creating infinite
I have written an EA, but the prices going into the EA on the Strategy Tester are different to the ones on the History data, for the same date and time. Can anyone help
I am still new to coding and I was trying to make my arrow system stop repainting. what do I need to add or remove from my code because right now it always repaints
  Trend following EA  (66   1 2 3 4 5 6 7)
I'd like to open up my latest development idea to other members of the forum. I started out with a simple EMA Cross EA and started chopping and changing it. What I now have is an EA that checks the current trend my confirming up or down trend against M5, M15, M30 and H1 timeframes. When al four TF
counted=IndicatorCounted(); if(counted < 1) for(i=Bars - StartBar; i < Bars; i++) { TrLevelSlow[i]=0.0; AtrRsi[i]=0.0; MaAtrRsi[i]=0.0; Rsi[i]=0.0; RsiMa[i]=0.0; } counted=Bars - counted -1; //---- for(i=counted; i>=0; i--) Rsi[i]=iRSI(NULL, 0, RSI_Period, PRICE_CLOSE, i); for(i=counted; i>=0; i--)
[Deleted]
Hi, i'm trying to get this to work on a 5 min time frame. Period the iHighest function should be searching for is PERIOD_D1. int HC() { for ( int i= 0 ; i< WHOLE_ARRAY ; i++) { int BarShift = iBarShift ( NULL , PERIOD_D1 ,time[i], false ); } int IV = iHighest ( _Symbol
[Deleted]
Hello there. Indicator gives me totaly 4 variables, which are drawn in indicator window. But i need only 1 of them to be avaible in Data Window. How can i hide variables i do not want to see in Data Window? Thanks.
This book https://book.mql4.com is great but I need it in epub format so can I read it on my mobile in large and clear font because my eyesight is weak. PDF format does not provide the feature to enlarge the font and the feature of the magnifying glass in the mobile is tiring I wonder why the book
Hi, I am creating an EA which scans all the symbols in the market watch. In that, every symbol runs a set of custom indicator which I developed. From this, I am getting " indicator is too slow, 5640 ms. rewrite the indicator, please " this issue in most of the indicators. I am using " int Nbars =
Dear all,     The 'Sleep' command doesn't work in indicator. Is someone has a solution to make a sleep in a custom indicator ? Thanks in advance for your answer!