Salaam; I need a demo account from a broker to get data of all commodities. I have a real account Now but it does not have them. things I want: Lead ; Zinc ; gold ; wti ; brent ; sugar ; dollar index ; copper .... thanks
2016.08.02 13:00 Indicator USDCAD,H1: USDCAD H1 Ema20:Ema201= 1.3105:1.31082016.08.02 12:00 Indicator USDCAD,H1: USDCAD H1 Ema20:Ema201= 1.3110:1.31102016.08.02 11:00 Indicator USDCAD,H1: USDCAD H1 Ema20:Ema201= 1.3111:1.3110 Dear All, Above show the EMA 20 (Ema20 is current bar and EMA201 is...
Hello Im trying to copy the value of a member of an array to another position in the same array. I get the error: '=' not allowed for objects with protected members or inheritance but I dont understand why I get this. Can someone help please? Code: class COrderEntry{ private: #define...
Hello I have a problem with the TS. the closing of the position, the TS should not open another position until the two moving averages are not touching. How can I do ? Thanks for your help
I know there are classes that can be used to draw graphics on the chart, I am developing an indicator that will have lots of graphics and trying to run it becomes very slow, its not an option. So I need to know how I can use if possible the windows api to completely redraw the entire chart, put my...
#property strict#property indicator_chart_window#property indicator_buffers 5//---Indicator Colours#property indicator_color1 clrGreen//up arrow#property indicator_color2 clrRed//down arrow#property indicator_color3 clrCrimson//SMA10#property indicator_color4 clrNavy//SMA25#property indicator_color5...
[Deleted]
When I restart the mt4, I found that the lines I drew, they all lost. Can anyone tell me how to save the lines I drew?
Hello, I implemented the class CListView in my code to make a multiple line editable list (for the user to write in). Everything works well except one thing: only 1 line is selectable at a time with the mouse. Any idea how I can make it so that dragging left-click over the list, it selects all lines...
[Deleted]
Hello, fellow coders! Recently Ive been using buy/sell scripts in my trading where you can set up the % of account balance you are willing to risk and how many pips will this % represent. Code for this script where you input the variables - #property show_inputs double...
Hello, MQL community. I hope you can help me with the following issue: I am trying to print a zScore of daily ranges (which is just the standardize function in excel) and horizontal lines in the same chart. When the zScore[i] > 4.36, the code zooms into the 1H time frame of daily bar[i], looks for...
[Deleted]
Hi, I variables with the name that is variable. I try to explain: double highprecEURUSD = 0; double highprecUSDEUR = 0; check ("EURUSD"); void check( string valute){ Print(highprec + valute); } I would like to print the value of the variable depending on the string passed to the function check....
New article Cross-Platform Expert Advisor: Reuse of Components from the MQL5 Standard Library has been published: There exists some components in the MQL5 Standard Library that may prove to be useful in the MQL4 version of cross-platform expert advisors. This article deals with a method of making...
New article Graphical Interfaces IX: The Color Picker Control (Chapter 1) has been published: With this article we begin chapter nine of series of articles dedicated to creating graphical interfaces in MetaTrader trading terminals. It consists of two chapters where new elements of controls and...
dear all How to use OBJ_TREND to draw trend line from the High of day snd the High of previous day I make this code , but not workable , what is the correct code double Hi0=iHigh(Symbol(),PERIOD_D1,0); double Hi1=iHigh(Symbol(),PERIOD_D1,1); ObjectCreate("mytest",OBJ_TREND,0,Time[0]...
Using MQL4, how can I execute a BUY order (seen below) if one variable x has a value of 1 and another variable y has a value of 3? I need it to work like this: Variable x = 1 Variable y = 3 So if x is MORE THAN y, execute this script: extern int TakeProfit = 10;extern int StopLoss = 10;void...
[Deleted]
Hi guys! I’m looking for a function that returns if the last trade was a win or lose trade. In other words, if the price hit the take profit or the stop loss of the last trade. If someone decide help me, so, PLEASE, give-me a function that you have sure that work correctly, because I’m not...
[Deleted]
Hi guys! I’m looking for a function that returns the number of consecutive profitable trades until X victories. When the number of profitable trades hits the X value, so the count is restarted. If someone can help me... thx!!!
[Deleted]
How can I fetch a newly released economic calendar value and set it as an 'extern int'? Is it possible in MQL4? For example, if I needed the latest value of the UK Bank of England Interest Rate, could I fetch the latest figure the second (or near the time) it was released?
double last_order_profit(int magic){ for(int i=OrdersHistoryTotal();i >= 0;i--) { OrderSelect(i,SELECT_BY_POS,MODE_HISTORY); if (OrderMagicNumber() == magic){ break; } } return OrderProfit();}
[Deleted]
Hi, my EA does not write all logged-defined entries in the expert log files. The curious is this: (1) In the strategy tester all log entries are 100% correctly and 100% completely entered into log files (expert/logs). (2) But most log entries on demo or live accounts are simply omitted. Maybe 90%...
[Deleted]
Hello, fellow coders! I have an indicator that shows me the price difference between the newest candles open and 21st candle close. This is working fine except for one crucial thing - it doent update with the chart. It keeps showing the value for when it was first added to the chart. I have tried to...
double last_order_Type(int magic){ for(int i=OrdersHistoryTotal();i >= 0;i--) { OrderSelect(i,SELECT_BY_POS,MODE_HISTORY); if (OrderMagicNumber() == magic){ break; } } return OrderType();}
hi i need 30 20 sec, chart in meta4 how i can get this plz reply
//+------------------------------------------------------------------+#property version "1.00"#property strict#property indicator_chart_window#property indicator_buffers 5//---Indicator Colours#property indicator_color1 clrGreen//up arrow#property indicator_color2 clrRed//down arrow#property...
Hi guys, here i am again to ask you an help. As in subject i wish EA close trades after X minute if position is in loss. So i write the following code: void exitloss(){ int ExpireX=60*MaxHour; for(int cnt=0; cnt<OrdersTotal(); cnt++) { if(OrderSelect(cnt,SELECT_BY_POS...
Hi i'm trying to create a virtual multi-currency backtesting tool in MT4. I have an issue with iMA(). as far as i know, iMA uses Close[0] in its computation, meaning the tick data, but when i try to compute iMA on other pair than the one selected in the Strategy Tester, i have constant outputs...
I am using SMA 50 and SMA 200 on Daily Time frame. I want to use the same SMA 50 and 200 values from opening 15 min time frame. Is this possible? if yes, please let me know the exact value for 50SMA and 200 SMA? Thanks in Advance!
Good day, I'm beginner in MQL 4 and building my first EA. I want that the EA will buy or sell everyday from 9:00 to 10:59 depends on High and Low of H1 candle starting at 8:00 same day and sell it if it reaches the stoploss or profit target. It is actually working in that time, but sometimes it is...
Hello guys, good day all. I want to assign economic data to a variable as soon as they are released in order to incorporate same to my auto trading strategy . By so doing I want to be able to program my EA to either buy or sell when a number of released economic data meet certain conditions. This is

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.