MQL4 and MetaTrader 4 - page 231

Greetings everyone, I try to get a specific symbol information (in my case it's GBPUSD) in a tester while testing another pair (EURUSD). When i try to get the information about how many symbol digits the GBPUSD pair has, i get '0'. The used code: SymbolInfoInteger(symbol,SYMBOL_DIGITS) Is it
I have HTTP Delete method API call via WebRequest, but it reported an error with "Error in WebRequest. Error code  =4051". It works while I use POST/GET method. Below is my code. call point: DeleteOrders("26041"); int DeleteOrders(string OrderNo = "all") {    string url = "http://localhost/orders";...
I have much success using WebRequest function from mt4 but i would like to ask does mt4 not support PUT method ? POST and GET work great, but PUT always fails, the error suggests my parameters are wrong, i use the same as a POST i checked on my API using curl and it works fine yet MT4 seems to not...
  sine wave  (7)
Hello everyone. I would like to draw a sine wave with specific frequency and amplitude on the graph. I have created an indicator but it has three problems.1) When changing timeframe the frequency changes.2) The wave never exceeds the last candle.Instead of creating an indicator, perhaps it would be...
I have a custom class in MQL4 and I would like to create a function that returns a instance of it. Here is my code: FracRes* calcFractal(double x, double y, bool x_, bool y_) { FracRes *res = new FracRes(x_, x, y_, y); return res; } class FracRes { private: bool isTop; double Top; bool isBottom;
  5 digits detection  (57   1 2 3 4 5 6)
double pointsPerPip(){ string suffix = StringSubstr ( Symbol (), 6 ); int digits = MarketInfo( "EURUSD" + suffix, MODE_DIGITS); if (digits == 0 ){ digits = MarketInfo( "EURUSD" , MODE_DIGITS); } if (digits == 0 ){ return ( 1 ); } else { if (digits == 5 ){ return
so guys, i have been using my mt4 mobile to receive alerts from my desktop mt4,until yesterday i have not been receiving notification. i have unistalled mt4 on mobile and reinstall. closed the desktop and tried it again,still no avail. how do i fix this
I need a code to work like this: When a BUY order is closed at Stop Loss, a new SELL market order is opened at a double amount of the just closed order with the same SL and TP in PIPS like just closed order. When a SELL order is closed at Stop Loss, a new BUY market order is opened at a double...
MT4 alerts to phone not working using MetaQuotesID. Looks like it’s been a problem for a while now. The error on journal shows as “Test message from ... not sent to MetaQuotesID“ Any fixes or suggestions ? Thanks
hi guys i'm new in mt4 i want an expert that: if 2 candles in timeframe m1 are ascending and in timeframe m5 an ascending candle is forming then open a buy position if in m5 ascending candle change to descending candle then close position if 2 candles in timeframe m1 are descending and in timeframe
Original code (it returns the first closed order from History): for(int i= OrdersHistoryTotal (); i>= 0 ; i--){ if ( OrderSelect (i- 1 ,SELECT_BY_POS,MODE_HISTORY && OrderSymbol ()== Symbol ()){ double L astTradeClose= OrderClosePrice ();}} The right one: for(int i= 0 ; i< OrdersHistoryTotal ();
Hi guys i write a function that check if in timefram 5m the last candle is ascending then close sell position an if last candle is descending close buy position but it cant close positions when i try to comment returning OrderClose on chart it only comment false please help me that where is my
I want to make a script that gets the value for 50EMA, 100EMA and the current price for each bar.(e.g. M30) So i have made this code to pick up the values: double x55EMA = iMA(NULL, NULL,55,0,MODE_EMA,PRICE_CLOSE,0); double x100EMA = iMA(NULL, NULL,100,0,MODE_EMA,PRICE_CLOSE,0); double...
The High-Low retrieval solution offered by realtrade is powerfull and good (https://www.mql5.com/en/forum/140830). However, I like to have the smaller "in-between-Highs-Lows" as well. My goal is to calculate and multiple plot Fibonacci values. Can someone give me sample code for a special for-loop....
hi guys , why not enter in the if ? ProfitMin=100; CtrlSellTP=0; if ((Bid <= (OrderOpenPrice()-(ProfitMin* Point * 10 ))) && (CtrlSellTP== 0 )) { Print ( "QUANTEEE111 " +(Bid-Point4TS* Point * 10 )); double NewSL=Bid-Point4TS*
To preface, this is coded in mql4. Don't know where else to put this so I apologize if this is the wrong spot. Anyways, I'm coding a pretty simple EA that looks at the EMA and Stochastic Oscillator to determine when to make a trade. The only way I want it to close is via a take profit or stop loss
Hello , Guys I am looking for a free expert advisor that sends notifications to your phone whenever RSI is overbought or oversold for all currency pairs. Kindly note that I am using MT4 application.If anyone knows an EA with these specifications please mention it's name. Thank you
I use kernal32.dll function to delete the log file as just the expert is initial izing but it don't working,... every other type file is deleting through this function but the required log file is not possible to delete at the time of initiaziation. I just want to clear all text inside the log at
Hi, I'm trying to stop the EA if the TimeCurrent is greater than a defined Date1. The program is working fine IF the two date are different , But once the dates are identical and the difference is only in time, it's not working (eg: TimeCurrent is: 2021.01.24 01:47 and Defined date is: 2021.01.24
Hello Community I got a little problem with a Indicator I made. Sometimes if i switch the timeframe, The Indicator is drawn randomly all over the chart. Indicator normally: Indicator Buggy: Does someone know where the problem is? Here are some parts of the code: //Indicator drawing and buffers
Is there a setting on MT4, or an indicator, that will show the dollar size of your order, on screen and/or the Terminal, instead of (or as well as) the lot size
Hi, Indicators are usually posted on the upper left corner on the MQL5 site. Below the indicator there is a Download button. However, when I press the "download' button nothing happens. Long time ago I could download these indicators, but not anymore. What could be the problem? thanks in advance
Hey guys, I just need some help with the logic to this problem I seem to be having, and perhaps it is because I am thinking of this in the incorrect manner? So, for finding the time of the beginning of the week from any given day within that week, I have simply  used: int day_of_week=DayOfWeek();...
  How to calculate degree ?  (15   1 2)
If tan(X) = 20. What function use to find X ? Thank you
Hi, I am trying to code a way to release orders, but it is not working. Does anybody know the logic? //+------------------------------------------------------------------+ //| Profit loop |
Hi all, I am trying to write script for opening additional orders instead of setting stoploss. For example: 1 Buy Order is placed and it is going loss, if openprice is reaches the distance (eg:300pips), it will open another buy order. Then, Order 2 is making profit more than account balance or
[Deleted]
Please any Help is appreciated I am new to to MQL in General and I have been trying to figure out this problem. After opening a trade It does not close with my condition and I do not why? if(total<1){ if(dayOpen > dayClose && prevDayOpen > prevDayClose) { SellTrade(); } else if(dayOpen
I want to make EA like this EA takes position when price during above 20ma and does not exit before price once goes down below 20ma then exits when price comes back above 20ma. But my EA exits soon after taking position because price is above 20ma. If someone knows how to fix this, It would be very
Hi, I need to update an old indicator (T3 Trix) to the current language. As I understand, the old language uses functions like init() and start(), the newer language I'm needing is more like Onlnit() and OnCalculate(). If anyone could point me the the right direction it would be much appreciated
Pre-600 code generating this error on compilation. What doesnt the new MQL4 compiler not like?