I'm trying to code an indicator that displays a histogram of each hour in the past based of a candlestick's high and close. For example it calculates whether each specific hour in the day has been bearish or bullish based of the past data. For example.. Each bar in the histogram represents each...
If I have two points with two different times can I know the time difference in minutes?
[Deleted]
All, I have write a EA for test, it imports some functions from another DLL, but I could not do the back test, it always said 'the DLL is not allowed', e.g. "2016.10.15 10:28:09.389 2016.09.01 00:00 Cannot call 'ConsoleApplication2.dll::InitPipe', DLL is not allowed.' But, how can I allow the DLL...
Where the best place to put the global variables? Inside init(){...} or outside the function?? My variables will used in many functions repeatedly. I want to know the best way and efficiently to create indicator.
I found BUG in Nested if - else if - else if - else. I can't declare same variable name in other blocks. According to MQL4 documentation: A variable declared inside a block (part of code enclosed in curly brackets) belongs to the local scope. Such a variable is not visible (and therefore not
void OnStart() { double Lots=((1860.03*1.0/100)/(114.542-114.511))/(0.87/0.001); double NormLotsRound=MathRound(Lots/0.01)*0.01; double NormLotsDouble=NormalizeDouble(Lots,2); Print("Lots is, ",Lots); Print("MathRound(Lots/0.01) is, ",MathRound(Lots/0.01)); Print("Lots with MathRound,...
[Deleted]
Hello, I have an EA. I want to insert security code in it. I want to do that the EA works till specific dat and time. Forexample; I want that the EA works till Oct 15, 15:30 pm. Secondly, I want to hide my EA's code. Can you help me, please? Finally, I want tthat the EA works for specific parity
Is it safe to buy EA from folks you do not really know ? Can the EA that you buy from some one else online be used to hack into your PC ? Regards
The most interesting figures at the Strategy Tester Report are imho Total net result and Relative drawdown. Both figures will be greatly dependant on the choosen Order size. Another valid statement is that the rate between Order size and Account balance together with the Relative drawdown will...
[Deleted]
Hello, I write an Expert Advisors program that stores the Indicator values iEnvelopes, iBands and iMA in an Array. Unfortunately, the program doesn't work. No prices are stored in the Array. What must I do? extern int SMA_Period = 4;extern int SMA_Shift = 0;extern int SMA_Method = 0;double...
How to get the current bar color? Is there any function() for this task? I have an idea to know the current bar color. Comparing if the open price is greater than closing price/current price then it means that current bar is red. Do you think my idea is correct?
As title says, i'm having some problem placing BUYSTOP/SELLSTOP order sometimes, i get Error 130 (ERR_INVALID_STOPS), probably related to MarketInfo("EURUSD",MODE_STOPLEVEL). My broker return 0 as value from MarketInfo("EURUSD",MODE_STOPLEVEL), i tried to correct the OrderSend price adjusting it...
Hi comrades, how can I continue writing on the next line (similar to pressing the 'enter key' on a keyboard) on the label of a button I have created? Thank you for you in advance?
for(int pos = orders_total-1; pos >=0; pos--) VS for(int pos = 0; pos < orders_total; pos++)
(3)
Hi all Been searching around the forum looking for references in regard to when to use "for - count down" vs "for - count up" statements. I use the following code to check open orders in my bot int orders_total = OrdersTotal (); for ( int pos = orders_total- 1 ; pos>= 0 ; pos--) { if
Hi Guys So I have a strategy that I have been using in Mexcel, but I want to be able to backtest it on Metatrader. Only problem is that I have no prior experience in MQL4. The idea of my strategy is to use the 15min, 30min, and 1 hr timeframes (i will write the strategy and laymans terms but I have...
Hello everyone, I should add in the Alert pop-up, the value of a variable double , but as I wrote the code is not good. #include <stdlib.mqh>#include <stderror.mqh>//--- indicator settings#property indicator_chart_window#property indicator_buffers 2#property indicator_type1 DRAW_ARROW#property...
Arrows with custom indicator only working for sell signal and only for one previously closed candle
(8)
Hi, Sorry for my poor skills with programming. I have a volume indicator and based on this indicator I would like two arrows to show up. Code for my arrows indicators is shown below which I have taken from this link. https://www.mql5.com/en/code/7332 #property indicator_chart_window#property...
[Deleted]
new to meta trader so bear with me. I am writing an EA - what I want to do is detect a bar change in the Fisher_Yur4ik indicator. Does anyone know how to do this? If so could you supply me with a code sample? Thanks in advance!
Hi, I have lost the last week (02/10/2016 - 07/10/2016) download of the calendar news from ForexFactory.com. If someone can upload it here it will be great. Thanks in advance.
Hi, In my order window the buy line is red and the sell line is blue. How to change the colours?
my EA attached on every chart works fine when only one chart on the upperest window , i want to see the overall performence of all the chart about 24 charts ,and tile herionly ,ea does not work .
Please give me sample code of Table indicator with value inside. I read the documentation many times but I don't get it because the sample code in there are not simple enough for average programmers. The documentation lack explanation/good short sample code. Look at this example code in your...
Hi Coders, My MetaTrader is running genetic optimization since a week. It needs some more days before finish. But now, I have to restart my Windows. So, is it possible to stop the optimization and then can I continue it? Thank you in advance. Relative
Params indicator line string or number output for my EA ?
Running an EA on a Demo Account and running it on a Live Account Besides the first being that Fake money is used and the second being real money is used ... Are they the same, Result Wise ? Or will there be differences between the results of a real and demo account run ?
Dear Sir, The code work me only current time-frame 1 order per candle please modify the code. Thanks.. Code Here <decompiled code removed by moderator>
[Deleted]
Hello, I want to send RTD from MQL. In Excel commandscan be send using RDT: “=RTD("ProgID,"server","Topic1",..."Topicn")” There you can send e.g. a command to place an order to another RTD server. Now I want not to use Excel, I need a bridge to send RTD commands from my MQL code. @ jjc: I was told...
Hi I'm new to Mql4 and I have problems with ObjectCreate() function. I want to create script that gonna show me some events on the chart via drawing vertical lines. I came up with that #property copyright "Copyright 2015, MetaQuotes Software Corp."#property link "https://www.mql5.com"#property...
Hi, I have a set of MT4 indicators that draws alert dots on the chart, histograms and lines. The indicators generate an alert signal and then some other indicators are used for confirmation. We can enter a trade when all confirming conditions are met at or after a max of 3 bars after the candle...
[Deleted]
Hi guys Small problem.... While all other indicators update accordingly on MT4, the SMI indicator doesnt. I have to switch timeframes and swtich back again to get the smi u to date. Anyone else has this?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.