MQL4 and MetaTrader 4 - page 124

Hi, I used char in symbol but I got value=0, If use string then I got combile Error: 'arr' - structures or classes containing objects are not allowed testtoarray.mq4 68 33 struct prices { char symbol; // symbol double price; // price }; //--- global variables int
Hello mates, I have an include file (named: Foo.mqh): //+------------------------------------------------------------------+ //| Foo.mqh | //| Copyright 2021, MetaQuotes Software Corp. | //|
Is there something like an alert for an x amount of pips for positions that are profiting? For example: When a gold position has 20 pips profit i would like to hear an alert, or when a silver position has 50 pips profit i would like to hear an alert. I did my best trying to find such a tool :) but
Which one of these is a current hart 1. The chart upon which the EA is attached. 2. The chart that is last clicked on the window. A little confused here. Any help
Hi, in my txt file I have: Direction:BUY;Magic Number:432;Price:1.03654 Direction:SELL;Magic Number:44234232;Price:1.05654 Direction:BUY;Magic Number:43233;Price:1.07654 if (Direction==SELL && MagicNumber== 44234232) { Alert( Price:1.05654 ) } I don't have idea how to do this from reading txt file
I found some link that explain about y=k*x+q https://www.mql5.com/en/forum/306293 "k" for the red line is 1 / 2 and for the blue line - 1 "q" for the red line is 2 and for the blue line 5 In general, "k" is a tangent angle between the line and axis x and "q" is a shift on axis y. For example, if you
Hi, This code is problem because if not exists returns 0. I think is problem because the code use for all OrdersTotal in the same time, but I need to get only ticketId for OP_BUY first, and OP_SELL first. So, I need to get Open price from ordertotal OP_BUY and OP_SELL. How to do this? double
Hello, My custom Indicator was working fine before 15th April 2022, and it stopped working suddenly. It still works properly on strategy tester, but messing up all points for all points on the graph before
I need to back test my EA since 2015 year to year. This is what I am doing now: I hired a VPS and run an optimization backtesting on MT4 strategy tester tool for one year. I import results to an Excel and order/filter the best of them. Then, I run a backtest on MT4 strategy tester tool for each year
  control points  (10)
does higher time frame has more control points than lower time frame in optimization
  Candlestick pattern recognition  (105   1 2 3 4 5 ... 10 11)
Is there an indicator for MT4 for automatic candlestick recognition that is visual friendly? Like this one here : (picture was taken from xtick professional software) Thanks! Question #2 How can I put moving averages behind the chart patterns (candlesticks), so it doesn't cover them but they go
  iMa Pip value  (2)
How do I get the difference in pips between the 5EMA and 10EMA in every chart. That is: 5EMA - 10EMA in pips (that works in every chart)? This is for an MT4 expert advisor. Thanks in advance
Hi all, I've created an grid base EA and I'm trying to optimize it but PC never gives results (trying the start hour, end hour, pips and grid distance - Nothing). Any advice would be gold for me, thanks
  Time Filter EA Trade  (12   1 2)
Is there anyone in this group who can help me. I want my EA to open trades only at certain hours (not all the time). For example: I want the EA to be able to open trades only at 10.00 to 15.00
Hi I want to remove " symbol. I remove : using this Print ( "Raw results are : " ,result[ 21 ]); string sep_for_limit = ":" ; ushort l_sep; l_sep = StringGetCharacter (sep_for_limit, 0 ); string ltp[]; int p= StringSplit (result[ 21 ],l_sep,ltp);
My EA can run on real and backtest,it base on zigzag indicator. When optimization , it show array out of range and cannot optimization. Can zigzag EA optimize
Hello, I would like to have this signal sends me an alert everytime there is a buy or sell signal because at the moment, it sends a signal once, if more than 1 buy signal has been triggered it only sends the notification on the 1st time only, a sell signal needs to be triggered 1st before the app
  Add on winning trade  (15   1 2)
Hello! So I have made this EA which is very simple, once a condition is met it will open a trade. And it will keep adding another 4 trades if conditions are met. All ticket numbers are stored in global area int Ticket1= 0 ,Tikcet2= 0 ,Ticket3= 0 ...Ticketx= 0 ; if (condition1) { Ticket1 =
Hello everyone! I'm starting to learn mt4 coding and working on an EA that is using iHighest and iLowest to plot these lines on the chart and I'm using these lines to calculate if the variable "Ranging" is either ZERO or ONE. This part of the code, to my knowledge, is working fine. The problem is
  Changing extern variables  (20   1 2)
Hi all, if you have the following program extern int var = 0 ; OnInit() { } OnTick() { if ( var == 1 ) { < do something>; var = 0 ; } } If during operation of the EA the value of 'var' is changed to '1' on the chart, the <do something> routine is executed and the 'var' value is set
Hello everyone. I am programming an indicator for Metatrader 4 and I would need the current signal to appear every 5 minutes, that is, at o'clock, at 5 minutes, at 10 minutes, etc. Following the criteria of the Brazilian MHI strategy, how to program the other values I have no problems since I do it
[Deleted]
I am displaying the price from the current position of a Moving Average on my chart, But the Value is 10858.5 on the EURUSD, I am wanting to move the decimal place to the correct price of 1.08585 I tried using double MA1 = NormalizeDouble(MA[i],1); yet that did not work, All help appreciated 😊
I would like to draw automatically on 30 MIN chart two lines (support and resistance) indicated by the last 300 bars. From the last 300 bars indicator should find two MAXIMUM BARS (ONLY 2 HIGHEST BARS AMONG THE LAST 300 BARS) and draw the RED LINE and from the other hand the same indicator should...
hello, how can i do what i need to do as specified in subject line? reason why i need to do this is sometimes the $125,000 inital deposit setting which i manually set in the "expert properties " box strangely changes back to $10,000 sometimes when i shut down and re-open the MT4 terminal (maybe...
  Delete file. hst  (12   1 2)
You can delete hst files in folder history? 
hi everyone I use two moving average 20 and 50 and I enter to the trade in the pullbacks. In fact, I enter trading after pullbacks when the price is above 20 (bullish trend) or below 20(bearish trend). But it is important for me to know How many pullbacks are we in right now?(After the last
im trying to build my first EA. and the first step was to try to make the EA take a buy och sell position on a specific indicator. what i was expecting was to see a trade placement on the bar after the signal (which i have marked with red in the screenshot). but it seems that its placing orders a
Hello, I think I found a bug with MT4 on build 1353. I was back testing a trading robot on the symbol XAUUSD and it opens a long/buy position on 2016 July the 6th at 2:00 AM. This is using Dukascopy data. It opens at a price of 1368.81 and set a SL at 1273.81 I see this message in the logs
[Deleted]
  Show timeframe of chart  (12   1 2)
Hi guys, i like to receive an Alert message with Alert(); with the Text of the current timeframe in the chart Alert(Show me the actual chart timeframe); I can't find a call for that. I think one of you know an easy solution.
Hi, i tried to Marks candlesticks with Horizontal Line with body < 50% of overall length (high-low range), I use #property indicator_type1 DRAW_LINE but it not draw horizontal line can you help me please? ths is the script i tried to make