MQL4 and MetaTrader 4 - page 85

  Fractal  (3)
Hello guys! Trying to get the latest fractal value and I came up with this: double GetLowFractal() { double val= 0 ; for ( int i= 0 ; i< 300 ; i++) { val= iFractals ( NULL , 0 ,MODE_LOWER,i); if (val!= 0 ) break ; } return NormalizeDouble (val, _Digits ); } it
The strategy tester report used to automatically open the web browser when I do a "Save as Report". But after reinstalling MT4, it doesn't do that anymore. Is there a settings to this
how should I recompile the mql4 file into .ex4? from metatrader
Hello, if I modify the stoploss or takeprofit with OrderModify in MT4, and afterwards I call OrderStopLoss immediately, then the result is the previous stoploss before modification. Is there any delay before OrderStopLoss will show the new value
MQL4 platform opens a trade without a stoploss and take profit and then stops all orders from the EA. Since this Monday, this has happened frequently with a VPS in place
I cannot figure out how to add text just above the horizontal line drawn on the chart and centered in the chart window. The following is the code I have written so far: ///////////////////////////////////////////////////////////////////////////
  Language Basic  (2)
Hello guys! I have one question is it any diference between static int some; //or int static some; Thanks
I opened my charts this morning and realized that my charts are missing 8 hours of data. I usually work with 4h candlesticks and i try changing the charts to 1h candlesticks but the same hours are missing
[Deleted]
  MT4 EA  (17   1 2)
Hi all, My mt4 ea is based on 1minute timeframe based on moving average but it opens and closes trade every minute and keeps on repeating. How do I fix this problem ? Please help is needed. I have used function such as max open trade, max long trade, max short trade, max pending trade etc, but I
  Stop loss  (3)
Hi I'm very new at this and put a trade on MT4, My stop loss was set and the candle came very close but didn't hit or trigger my alarm on trading view and the price on the graph was below my stop loss. I was taken out of the trade within 8 pips before my stop loss. Is this normal and do I need to
My object appears on screen briefly at a fractal then moves to my expected fractal. bool A_low() { { if (histo()) { val2= 0 ; for ( int i=histoupcount; val2== 0 ; i++) { val2= iFractals ( NULL , 0 , MODE_LOWER, i); A = val2;
im trying to make an EA from custom indicator values (don't have the source of the indicator !). i can get error everytime i put the EA on chat : cannot set millisecond timer (100) , any idea how to fix or bypass this error ? extern int MagicNumber = 0 ; extern bool SignalMail = False; extern bool
Hi. I'm trying to learn to code. I'm attempting to code a moving average crossover, but when I ran it through Strategy Tester , no trade was open. I followed a few YouTube videos when writing this code. I know there are a lot of master coders here. Can you please tell me my errors
  TTM scalper  (128   1 2 3 4 5 ... 12 13)
Well, here is an indicator that works almost like TTM scalper. The explanation for the "almost" : I did not "iron out" the occasional differences that happen between "my" version and TTM version. There are multiple reasons for that. Some of them : the logic of this one is quite clear and I do not...
Hello everyone, I would appreciate your help since I am not so familiar with mql4. My goal: When the code starts EventSetTimer should be 0 as well as the variable x to get the close of bar 0 and bar 1 as "sell"/"buy" comment. After that the EventSetTimer should work only 5 seconds after the candle
Hello The general idea is partial at 10RR 50% and the rest run. The partial price calculated is correct, but the partial did not happend, and i don't know why ? Thanks for your help extern int RR = 10; extern int sl = 25; void OnTick () { if ( OrdersTotal () == 0 ) { int buyticket =
hallo everyone, i want to create indicator which draw horizontal line on the last bar and updated with the chart. as image(1), not as image(2)
  MT4 platform  (2)
Hi everyone, I am curious about something. I downloaded mt4 from the metatrader website for learning purposes, but its showing like mt5 and wouldn't accept mt4 indicators. I have uninstalled and reinstalled, but its still showing as mt5. How can i get the original mt4 without using a broker
[Deleted]
Hi Guys I'm trying to do an ADR-Indicator Dashboard. First i want to create the ADR Indicator. I modified an ADR Indicator i found on the forum. For the dashboard i want to calculate ADR values for several pairs. I wanted to store the calculated values in an array. But as soon I try this, the
  Out of memory  (7)
2022.11.21 22:49:05.649 Prev_CSM AUDCADm,H1: not initialized 2022.11.21 22:49:05.649 Prev_CSM AUDCADm,H1: out of memory as any one had this kind of issue whet the indicator runs out of memory please advice how to resovle this kind of issues
Since the last update , if i try to go to the market section on the m4 platform it crashes and closes the program
Hi, I would like some help please, like the title says my EA work perfectly fine on backtest but not on real account . I don't receive any error message from the terminal, except from "2021.02.19 17:55:27.350 SP 500 TR STOP TEST 2 [SP500],M5: zero divide in 'SP 500 TR STOP TEST 2.mq4' (145,52)"
Hi Looking for a EA / Indicator that can save 1 second data (need only be Open) to a CSV file. Any suggestions? I have one that saves each tick, but it creates a lot of extra work for me as I only need 1 second resolution. BR /
So I tried to code something from tradingview and make it happen in MQL4. I updated this post to show new problem I have now. The indicator doesn't render new candles when I press play. It only show past candles but not new one. I have no clue why. Then I need to get the cumulatif of sums. The first
Since there is no cum() function in mql4, I need help to know how to code a function "cum()" that I can use for my code. I need it for my cumdelta variable "cum(delta)". void OnTick () { //--- tw = High[ 0 ] - fmax (Open[ 0 ], Close[ 0 ]); bw = fmin (Open[ 0 ], Close[ 0 ]) - Low[ 0 ];
when i use in real trading ,it woks fine ,but in testing,it show 'OrderSend Error 130',why
Hei, MQL5 Community I would appreciate your assistance and knowledge regarding an entry condition comprised of two moving averages and the RSI. A set of conditions must be met by the RSI, such as when set to true and then apply a predefined set of requirements as shown in the code below: To
Hello I can't find the XAU USD pair (and I searched well) on metatrader4, can someone help me
As the title explains I am having this issue when trying to backtest an EA. I used Tickstory to grab data from Jan 2009 and backtest from that date until today. However no matter what date range I set the EA to backtest, it won't start and simply says "EURUSD-TickStory: history data beings from
Hi everyone! I've made an simple indicator that prints the volume of the last 100 bars, inside that bar The same indicator also has a buffer that holds 1 for a long signal and 2 for a short signal. When I call this indicator from inside the EA with the iCustom function to get the long/short values