mr-roma / Publications
Forum
Find 5 greatest number in array
Hello, I'm trying to get 5 best profits from my last 1000 closed trades. I wrote code which almost gives me what I want. string BestProfit; for ( int b = 0 ; b < 1000 ; b++){ //Chek last 1000 trades double Barray[ 1000 ]; Barray[b] = RecentProfits(b+ 1 ); //This function
Get profit from specific time to specific time
Hello, I have code which gives me profit from specific time to today. //--+ Get Profit From Specific time to Today +--// double GetProfitFromDate( int month, int day){ double TimeProfit = 0 ; datetime CurrentTime = TimeCurrent (); datetime TimeFrom = StringToTime (( string
Text/Arrow Overlaps after changing
What I'm doing wrong? When text or arrow (Wingdings) is changing, it overlaps to last one like on picture. You can see it on first arrow. Code is simple .. if ( iClose ( Symbol (),IsPeriod[x], 1 ) > iMA ( Symbol (), IsPeriod[x], EMA1, 0 , MODE_EMA , PRICE_CLOSE , 0 )){
Calculate time left to specific time
Is there a way to calculate how much time is left from current time to a specific time? Like if I have time string "09:00" and current time is 20:40, how to calculate difference between those times? That's my code for New York time: TimeToStr( TimeLocal () + ((- 4 - Timezone + dstDelta) * 3600 )
When markets really open?
I am little confused about market sessions. I am working on market session indicator and when I googled when markets opening, for example New York, I found that it opens 09:30. But on Forex Factory website, it seems that NY opens at 08:00 and even I looked in some of MT4 indicators and their NY
Can we get full name from Symbol()?
I wander if there is a way to get a full name of any Symbol like it's shown on picture
Bid/Ask price is too long
Hello I have a little problem. I am trying to make an indicator which will show Bid/Ask price but it seems that for some symbols, they are just too long. That's my code: DoubleToStr(MarketInfo( Symbol (), MODE_ASK), Digits ); And same happens to iOpen/iHigh/iLow/iClose they are inaccurate too
Calculating High/Low price for specific time, from one point to another
Hello, I want to make an indicator which will give me an information about 4 Quarters High/Low prices. I have 52 Week range indicator but I'm struggling with 4 Quarter range. I tried iHighest, iBars, iBarshift but I still can't get the info I need. I know I must missing something. All I want is to
Get time from last 52 week's highest price
Hi, I'm trying to get time from specific candle like highest price from last 52 candles but it gives me incorrect time, can anyone help me? Here's my code: double Highest = High[ 0 ]; double Highest1 = High[ 0 ]; double Lowest = Low[ 0 ]; for ( int i = 0 ; i <= 52 ; i++){ if
Time[] Function in MQL5
Hello people, I'm trying to create Time [] for my MT5 indicator but there's something wrong and I don't know what :/ So, this is a Class code in *mqh #define DEFINE_TIMESERIE(NAME, T) \ class CLASS ##NAME \ {