MQL4 and MetaTrader 4 - page 279

Hi! This weird thing keeps happening to me while trading and I cant get rid of it. It displays the candles totally wrong, today I logged in a demo account just to show you this. Maybe one of you went through this on your mt4 account and can help me. So basically, look at my profit in the bottom
hello. actually i'm almost new to mql4 programming. i have a angle indicator which is using MA and inside other EA i want to call this angle indicator and want to read angle value so i tried iCustom but every i tried all failed. following is ma_angle source. and this is icustom code what i tried
  Hello world  (4)
Hello world. Hello world ()
Hi, Please, I need your help in code for adding Pending Stop Orders to an EA in MQL4. How can I open a stop order depending on the last trade that entered the market? Let's say I open a trade 0.01 BUY but and I want the the EA to take that trade and place a new order in the opposite direction with a
Hello. As soon as the sum of my open buying positions reaches $ 100 profit, including all fees, I want to work closeallbuying() void. I was unable to prepare a code that could work for this. I would be very happy if someone could help me
Hi there, I am new to MQL4 programming and came across the following practice problem online: create an EA which checks the previous N = 10 candles and if PSAR is consecutively above than iOpen() for all these N = 10 candles, open a sell position; if PSAR is consecutively below iOpen() for N = 10
Hi friends, I come across these function in MQl4. ChartTimePriceToXY() and ChartXYToTimePrice() While I was doing one of my coding exercises, I tried to convert a price say 1.0850 to X and Y coordinates and convert the resultant X and Y coordinates back to the price, expecting to get back the
Hello, was wondering if someone can help code this concept into an EA for me. Applies to any symbol, any timeframe. Unfortunately I just don’t understand coding, however I do know how to apply it! Default Parameters (but adjustable) Lot Size 0.01 2
Hi, I've got this EA here that uses the MA and stochastic to enter trades and has a set TP in pips but I'd like to add an orderclose function that would close the sell trades when the stochastic goes below 20 and close buy trades when it goes above 80. Unfortunately when I tried to do this the order
  Bug ?  (1)
i use iCustom to compute an indicator with a varying period. i use doubles for the period, for precision, but if I put the variable directly in the iCustom command line, it bugs and loops forever. if I use "(int)variable" then it doesn't loop it took me a while to find that error could it be
Hi, I have an indicator on multiple open charts in MT4. The indicator fails sometimes on reinitialization after a symbol change, but only on the weekly chart for this symbol. This is very repeatable. The other timeframes/charts are fine. This happens always during OnInit() when EventSetTimer(1) is
I want to scan indicator buffer (from current bar to old bar )with using iCustom code. for ( int J = 0 ; J < 1000 ; J++) { double up = iCustom (Fx_Symbol,TIME_FRAME, "indicator file" , 0 ,J)!= EMPTY_VALUE ; double dn = iCustom (Fx_Symbol,TIME_FRAME, "indicator file" , 1 ,J)!= EMPTY_VALUE ; if
hi every one I define an extern in expert: extern int Risk I want user just can insert numbers from 1 up to 3 like 1 1.2 1.3 , ..... 3 and couldn't insert number less than 1 or bigger than 3 How I can do it? Best regards
int OnCalculate ( const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const
is backtesting on open bar reliable? How does MT4 know when SL or TP were hit
Hi Experts, I need your valuable help on the following peace of code, I am trying to modify an open order as part of my EA but during the back testing it does not seems to be working. I have tested with several pairs, time-frames and time range but it does not seems to modify any order. Here is the
//+------------------------------------------------------------------+ //| mn Period Boxess + //+------------------------------------------------------------------+ #property indicator_chart_window #property copyright "mn" extern int
Hi All, Hoping there's something really obvious someone can point out to me. I have an EA that performs perfectly on backtests, and almost perfect on live trades - except for one key feature. At 2pm the EA analyses whether the current day price range is within the previous day price range. That
has anybody got an Mt4 virtual server running under Windows 7 family premium ? I started creating one and it hung at the stage in the screenshot https://www.screencast.com/t/6hbYA0noZgzE
Hello! Below is my lines of code to auto create VLine on other visible charts when I manually create it on the current chart. I don't know where I have made a mistake. Please I need your help. Thanks in advance. int OnInit () { ChartSetInteger ( 0 , CHART_EVENT_OBJECT_CREATE , 1 ); return (
[Deleted]
Hi, exist some "easy" order in MQL, which reverse my positions at the same price? Buy to Sell or Sell to Buy (always same size) OrderClose and next OrderSend (new reverse position) is slowly, I get slippage. Thanks. Endy
void OnTick () { double PRICE = 100 ; if ( OrdersTotal ()== 0 ) { int buyticket1 = OrderSend ( Symbol (),OP_BUYSTOP, 0.01 ,Bid + (( PRICE * 2 )* _Point ), 3 ,Bid-(( PRICE * 2 )* _Point ), 0 , NULL , 0 , 0 ,Green); int buyticket2 = OrderSend ( Symbol
Compiler doesn't get Error but when I attach Indicator to the chart Expert logs Array out of range (116,32) it means Close[z] by the way all of calculation of pprice() function correctly is done and it's drawn on the chart, but it doesn't generate any output
Recently I tried to install Mt5 on a Windows 10 machine (all the latest updates). My antivirus blocks it, because the installer "wanted to access a file with the Generik... virus". What could be the problem
Problem: While it is running, MT4 will load or remove bars in a chart (to achieve/maintain the "Max Bars In Chart" value), and when it does, my "separate window" indicator shifts by the number of bars that are added/removed. My indicator is my own tick chart, and therefore the indicator indexes
I do not want to renew my MQL5.com indicator's 1-year rental. How do I ensure that I am not charged for this again
Hello, I am new and just started coding mql4 EA. I got an indicator mql4 file, using TCCI indicator for drawing lines buy/Sell signal, there are 3 parameters in this indicator. I am wondering, can I pull these values into my EA, for buy/sell signal. Now, from what I tried, renaming the start()
Look at the following simple line of code: double ratio = candles[ 0 ].body / candles[ 1 ].body; When trying to debug this simple line, I get the following results: This result is all wrong! In other words, instead of: candles[ 0 ].body / candles[ 1 ].body // this is what I want to do... it does the
I have been setting my initial deposit for the strategy tester in the tester.ini file and the settings file for the EA in the tester directory and it worked fine until today. Now when i run a series of tests, instead of all of then running with a deposit of 1,000 i will find random tests running