MQL4 and MetaTrader 4 - page 124

Can't figure out if strategy tester as well as optimization is considering margin requirements for lots and considering it as draw-down against the equity? Seems like it should however leverage is never specified in the test unless you are using tick data from a reputable source which then would...
I am struggling to understand why all of a sudden my strategy tester wont run on the particular settings i am using. I am getting the error "not enough money" however my leverage is 1:500 and to open 1 lot it requires £200. on a 500GBP account i should be able to open 2 lots at a time leaving 100GBP
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
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
Hi I cannot connect my MT4 account to MQL5.community. However i can login successfully on mql5.com website with my login and password. And my account is successfully connected in MT4. Error messages: 2019.09.11 22:36:59.315 Signal: '549038': failed get list of signals, connection error 2019.09.11
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
  Ping IP with EA  (7)
Dear all, I need to Ping an IP to check if my VPS is alive or not. I want to code with EA mql, of course ! I try to use ShellExecuteA, it can call cmd.exe then ping. Unfortunately, ShellExecuteA does not return value of ping's result. Is there any other way that we can check if my VPS SERVER IS...
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