MQL4 and MetaTrader 4 - page 200

int pos=0; int counted_bars=IndicatorCounted(); actualyear=TimeYear(iTime(NULL,PERIOD_MN1,0)); // if(counted_bars < 0) // return(-1); //---- last counted bar will be recounted if(counted_bars > 0) counted_bars--; pos = 0; while(actualyear-TimeYear(iTime(NULL, PERIOD_MN1
I was just wondering if there is any way to identify the type of a certain pair (by type i mean to identify if its currency pair , or indices or crypto pair ) I tried Using this : Print ( SymbolInfoString ( "XBTUSD" , SYMBOL_DESCRIPTION )); I was hoping that SYMBOL_DESCRIPTION might give me some
If I use an EA that uses MT4 standard indicators (such as EMA, RSI, etc), do I still need to attach those indicators on the chart or the EA could still run without it
Hello, I don't want to see live values in front of indicator name. Can I disable showing them
Recently I asked a coder why I was having trouble implementing some sweet code he'd written up. His response was priceless. "If you are sitting at the old terminal, this is your and only your problem. It's a shame to still sit at the old terminal. While you are sitting at the old terminal - do not
[Deleted]
Is having a script that connects to the MT4 server and performs trading operations , basically can connect to MT4 server directly without running MT4 client platform, possible…? Something like a PHP script to work instead of the MT4 platform but not like a web application though, rather it should
I have officially moved to MQL5 although it's gonna take time to port all my code over. At least, I thought, I won't have the same problem with ChartXYToTimePrice that I was having in MQL4. And I don't! I now have a completely different problem lol. In MQL4 ChartXYToTimePrice worked in debug but not
My EA stop working when change timeframe on chart Not happen on FBS happen on Exness Why
  Error Get SL = 0  (1)
i want to create flexible stoploss range by confirmation of candlestick, but my code still error . Here is my code : int GetSLPip() { int pips = 0 ; double p = 0 ; double delta= 50 ; for ( int i= 0 ; i<=delta; i++) { // Counting Pips for SL Value double HighSL = MathAbs (High[ 1
Hello I am trying to calculate Risk based lot size for XAUUSD but its giving me wrong value , and couldnt figure out what i am doing wrong here is my code : extern double RiskPerTrade = 2 ; extern int StopLoss = 5000 ; //SL points double CalculateLot ( double StopLoss_) { double
Anyone know where I can find the source code to moving average ? I want to see how the "applied to" section is coded, especially the weighted close, and the typical price.
I'd like to report some legitimate bugs in MT4/MQL4 but the service desk has closed down because, from what I gather, they were being flooded with requests which were actually amateur programming questions and errors which should have first been searched, and if necessary, posted in the forums. I...
//TRAILING BUYS for ( int P= OrdersTotal ()- 1 ; P>= 0 ; P--) if ( OrderSelect (P,SELECT_BY_POS,MODE_TRADES)&&OrderType()==OP_BUY&&OrderStopLoss()<OrderOpenPrice()&&(OrderOpenPrice()+Ask)>MaxSL) {
Hello, OnCalculate only produce open/high/low/close. How can I use use other prices types? Like original MT4 indicators. I nead a clue, or reference to an existing indicator in codebase which I can get idea from it Thanks int OnCalculate ( const int rates_total, const int
Hello, I would like to add the option for getting the GMT-Time via WebRequest. On my VPS the MT4-inbuilt GMT-option does not work correctly. I have some code, but would ask for some help. The code give me a result with no information about the GMT. What should I change? I cannot get my head around
I follow this guide to create classes loaded like usual variables, ie "my_class class1(Param1, Param2,...);" with ''parametric constructor". chapter "Passing Parameters to Constructor" https://www.mql5.com/en/articles/351 my problem is that when i create a class3 of a class2 of a class1, I can't
I ran into a bona fide MT4/MetaEditor bug trying to debug a script today. I'm in the process of moving to MT5 but that's gonna take some time. Meanwhile I discovered that my broker's MT4 platform (just reinstalled from scratch only days ago) brings with it an old version of MetaEditor. Here's the
I need help with a small piece of code that calculates the moving average of the Williams Percent Range indicator. Here is the code: ArrayResize(WPRArray, WPR_MAPeriod); for (int j = 0; j < WPR_MAPeriod; j++) { WPRArray[j] = iWPR(symbol, WPR_Timeframe, WPR_Period, j); }
Hi friends, I am just starting to code. I am intending only three things here. 1. if no buys open, take a market buy. 2. once a buy opens, give comment "Open Buy Price :" etc 3. if the market goes above the Open Buy Price, say Market is bullish and if it goes down say Market is bearish. But it works
Hello.. I've just started trading, and I'm looking for a an AO Crossover EA. I found and copied one from a video on youtube but it isn't compiling properly in the mql5 metaeditor. I would like some help fixing it, and then if possible converting it to mql4, because that's where my trading account
  arrays  (4)
hi guys, i need to use this arrays amount, but i dont know the problem, i tried print them on strategy tester but it didnt work double a[]; //+------------------------------------------------------------------+ //| Expert initialization function |
if (OrderTakeProfit()!= tp || OrderStopLoss() != 0 ){ if (OrderModify(OrderTicket(),OrderOpenPrice(),sl,tp, 0 , clrNONE )) Print ( "Modified successfully" ); else Print ( "Error in OrderModify. Error code=" , GetLastError ()); } I am trying to stop EA to modify the value when it has
Hello, I want to test the VPS on MT4 platform, we have 24 hours to test, but I cannot make it work so far. I watch this video and did everything on it, but is not working. I'm testing with a expert to see if is working, but I must be doing something bad. Here is the video: https://www.youtube...
Hi, How can I backtest signals which I've listed in a CSV file on metatrader4
Can you tell me whether it is possible to develop an EA that can enter/exit trades within 0.2 of a pip?( excluding slippage/spread etc ) The reason being as my coder has not been able to develop EA to this specification requirement now im unsure if it is possible within mt4, and should i give up on
[Deleted]
  Mt4 commissioner  (1)
My broker is charging me $300 for commission. I invested $1000. Is this fair? I thought commissions were free
Hi guys, Do you know any registry key or other procedure to get the path to the data folder used by MT4 (the one in APPDATA...) ?
Hi guys, is there any way to pick up info with one click on the chart? for example high and low of the candle
I have this value 0.004499807884787987 I want only 0.0044 what math function should use thanks
Hey guys. Does anyone know how to align the mt4 terminal time to match forex broker server time