MQL4 and MetaTrader 4

To post a new topic, please log in or register
The MetaTrader 4 update will be released on Friday, January the 24th, 2020. The update provides bug fixes and stability improvements. The new version will be available through the Live Update system
  On Arrays (2)
If you populate an array via a for loop from another indicators offset values (starting with 0), something like: double TestArray[]; for(i = 0 to 9) { TestArray[i] = Indicator(Symbol(), PERIOD_1HR...., i) } Is it already in the correct order to use any of the IndicatorOnArray functions ? or do you
Hi I have a trailing stop on my winning trades that works very well. Is it possible to have a similar trailing stop on losing trades rather than a hard stop loss. Can the stop loss be adjusted/ decreased as the price moves in my favor? Here is the code for my trailing stop loss on winning trades
Hi guys I am starting to get familiar with mql4 EA but I am stuck at a certain point. It would be great if I could get some support. I writing a script for EA and couldnt get past this point. I am checking for conditions in daily chart and if it is successful i want to check another set of
hi guys itry to set the time frame when i attach a script with this code but not work ChartSetSymbolPeriod ( 0 , NULL , PERIOD_M30 ); anyone can help me ? thankz
Dear Forum, I've been struggling to read the attached SSRC indicator values without success for days. The value returned by my code is different from what is displayed in the Data Window with same timeframe as the code. For some unknown reasons, the three values are the same and different from the
hello, i'm trying to code an indicator derived a alert on next candle as previous candle mean if current candle in green to send a alert as buy in next candle and if last candle is red to send a sell in next candle any help please
Guys, Need help with syntax. I need to find Second Candle of the day's Open Price . The code below works for first half an hour of the day, then it does not produce the result i want because of "0"(Current Candle). Kindly guide me with the right syntax. if ( iOpen ( Symbol (), PERIOD_D1 , 0 ) ==
Dear Forum, noob question for you! I am looking to use the iLowest & iHighest functions, to find the prices of past candles. I don't understand the output however - is it in pips or is it a price? For example I used iLowest to find the lowest value of a candle 5 ticks prior. I used the following
Hello, I am newbie here, so sorry if something wrong with this post. I am working on loading csv structure to array and I am getting this error Structures or classes containing objects are not allowed. I found but not helped me with this error. CSV file consists
hi guys i try to se over the candel a little arrow i create this script it create a rrow but not over the candel and when i zoom it the arrow is so much over anyone have some suggestions ? thankz //+------------------------------------------------------------------+ //|
I guys, I need some help. When I override an HLine object with the mouse, Mql4 draw a label that contain a text of index and level price of Hline. How can I read this text by an Custom Indicator, or an EA or a script? Tank you for every help
I'm brand new to coding. I found a course on Udemy that is really helpful but when I want to do something that the course doesn't cover, I really struggle to understand the MQL4 Docs. For example, it doesn't cover adding objects to the chart. Right now I'd like to add a simple vertical line whenever
Hi, I was told to activate the product in terminal after logging in, but once I did that I do not see where to activate the product. This may have been answered here on the forum, but haven't purchased from market before. How do I actually activate the product? Thanks
I need someone who can build an expert advisor for me
My trading strategy doesn't include trading trading news events, if USD has news at 5, I won't trade it from 4-6, can anybody help me figure out how do i make my EA do this. Thank you
Hi, I will like to know about any coder that can correct 7 EAs to pass market validation. I seriously cannot code it. I have tried almost everything, but of course, no what is totally correct : ) The coder can have a copy of the EAs In Exchange. It is certainly a simple task for someone used to
Hi everyone, I searched in forum but cannot find how to open an URL in MT4 and download a file from an URL. What I simply need is 2 scripts: - One script that open an URL (string type) that given in input of the script. - One script that download a file from an URL, such as: http://www.domain...
Suppose you want to do some action where if on the previous candle of some period indicator a == some value and indicator b<c then open a long position. Because Ontick() runs many times during the current period, when that if statement is true, it will trigger on each tick. So, it would open a long
Hi guys. I have this function template called to_type that I use to convert a string to other data types: template < typename T> T to_type( string str_val) { T val; if ( ( typename (T) == " int ") || ( typename (val) == " long ") ) val = StringToInteger (str_val); if ( typename
I Try to calculate average price of open orders . I am unebel to calculate it. I don't know reason. I am very thankful if eny one can helpme for ( int i= 0 ; i< OrdersTotal (); i++) { if ( OrderSelect (i,SELECT_BY_POS,MODE_TRADES)== false ) break ; if (OrderSymbol()==
hello.. please how to get the previous object on chart this code not getting the previous object for ( int iObj= ObjectsTotal ()- 1 ; iObj >= 0 ; iObj--){ string on = ObjectName (iObj); if ( StringFind (on, "Arrowbuy" ) == 0 ) confirmbuy== true ; }
I would like help in coding the time when my EA on MT4 is turned on and off. GMT 8:00am - 12:00pm GMT 3:00pm - 7:00pm GMT 12:00am - 5:00am These are the hours i trade. What code would i have to use to have my bot run at these times using my MT4 server time. Thank you
I am looking for the Close of the Heinken Ashi. Thought I have everything right, but gives me the wrong value double HAClose; color HColor1 = Red; color HColor2 = LawnGreen; color HColor3 = Red; color HColor4 = LawnGreen; HAClose = iCustom(0,PERIOD_M1,"Heiken Ashi"
Dear Meta Trader Community, Greeting for the Day !! Hope all are doing good here... This is my 1st Post on this forum and i am looking for a little help to code an EA based on attached indicatore . Simple Rule that need to incorporte into EA is Buy : - When Green Arrow Appears Sell :- When Red Arrow
I am trying to write SMA to file but it doesn't write to file . Can someone please tell me what I am doing wrong here..Thanks a lot in advance double ma_0= iMA ( Symbol (), PERIOD_D1 , 7 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); string var1=TimeToStr( TimeCurrent (), TIME_DATE | TIME_SECONDS );
Hi, experienced coders out there , please i need some help in adding alert sound when the 1 2 3 is printed on my chart , thank you for your kindness!! Here is the code .. #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2...
What is the best time frame to download tick story data into? Thanks
i need help with this custom indicator, it works well for pairs with value greater than 1 but flops for pairs with values less than 1
I use RSI divergence as my scalping strategy, the information candlesticks provide is important but i also like the simplicity that a line chart provides in help finding patterns, so I've attached a Simple Moving Average of 1 (SMA1) to the chart which acts as a line graph on top of my candlestick