MQL4 and MetaTrader 4 - page 269

I hope I have posted this in the right place. I am fairly new to mql4 so this has me scratching my head These are 3 lines of code from a much bigger program; so I show just the 3 lines that are confusing me in a simplified form If I use these. The indicator does not show anything. double Val1;
how do i download mt4.....because every time i download it it downloads mt5 rather
When opening multiple buy and sell orders. Need to close buy orders at their average profit value and sell order also. How can calculate averae profit value for buy and sell orders. first collect order open prices and lot sizes. And how calculate average buy profit price and sell profit price. Some
  Close All  (4)
I am looking for a bot that closes all open positions if one position is closed, any suggestions? MT4
After a power failure, my MT4 Account History no longer shows closed trades. When I click on "Account History / All History" it shows nothing but zeros. Even after replacing all files in all folders, the problem remains. The problem probably lies with the Registry, but how to find out which entry
Hello, Please take a look at this code and tell me why I can't access to  previous candle's rsi  RSIBuf[i+1] ,  I tried this AAA[]  Array but still not working when I try to comment (AAA[i+1]) in the strategy tester I get array out of range error please help me how can i use previous candle's data...
I am attempting to have another shot at detecting the 4 trading days prior to NFP for any month. Using the built in functions and the DaysOfMonth() available on the forum I have an idea. I have an external variable ExcludeDaysBeforeNFP() that can be set from 1 to 4. with 4 meaning it should not
Hi traders/coders, I want to ask whether is it possible that we could use the tick data recorded, with variable spread and volume in MT4 strategy tester? If its possible : 1. can I use any tick recorder? 2. i need to convert the data saved in CSV to FXT file to be able to load in strategy tester,...
I'm trying access a CObject* of a CArrayObj array but I can't seem to put it back into the structure that was originally placed there. My complex type is: class myobj_t : public CObject { public : double a; datetime b; myobj_t( void )
Hi dear coders, I would like to ask you a simple question, however for me it is not that simple... as you can see in the attached screenshot, I added two rsi indicators and a simple moving average of 50 applied to previous indicator's data in the same subwindow. My question is : how do I get the
Hi everyone. I'm new here posting for the first time so kindly pardon me if i may sound rude or straight forward. I'm using an custom indicator known as Buy Sell Signal which shows two arrows: 1 when its buy signal and 2 when its sell signal. Somehow i found out the way to correctly get the value
I'm running a strategy in the tester where certain actions is supposed to call the WebRequest function and send me a Telegram message. In the MQL Reference manual, it clearly states " WebRequest () cannot be executed in the Strategy Tester " on both MQL4.com documents and the offline manual, so I
Hi guys! Can I have an example of stop at breakeven
Hey Guys! In my backtest result, the order was modified successfully by changing the SL at the Order Open Price upon reaching 80% of total profit (Break Even). However, I still received the OrderModify Error 1 message. if (pip_Diff < 0.00400 ) { BuyOrder(); SellOrder();
  MT4 on Mac  (3)
Via my broker I have downloaded and am using the MT4 platform on my Mac - it uses the Wineskin software. However, it does not seem to want to recognise any of the indicators (eg risk calculators) that I download from third parties. Is there something I need to change in my settings
Hi , I hope someone can shed some light regarding the issues that i facing right now . I found out i have the different result if using backtesting and optimization here the result manually backtesting and edit parameter meanwhile if iam using optimization have this result here my code //TEST
hello community I am new here, so please excuse any mistakes I run a "designed" volume EA - 14 single "incicators" and 1 template recently I experience a complete slow down and "blocks" of my MT4 - I have changed nothing so far so what could cause the "problem" ? thanks in advance for any answer...
[Deleted]
Actually, this is my question. I am using MT5 for a long time, but I have to use MT4 for some reason. But mql4 has no OnTrade() and OnTradeTransaction() what is very sad. Therefore, I have to solve the problem with a small cost (in terms of resources). So far, I have not thought of anything better
//+------------------------------------------------------------------+ //| 1ClickModifyAllv03.mq4 | //| Copyright 2020, Khalid Judo | //| DI |
Can anyone help me to create a function to test for first day of the month? I have code below but i can not seem to get it to compile. // IsFirstOfMonth // bool IsfirstOfMonth() { datetime now.srv = TimeCurrent (); int now.dom = TimeDay(now.srv); if (now.dom == 1 ) // First day of the
double fastMaV = iMA ( NULL , 0 ,fastMa,fastMaShift,fastMaMode,fastMaPrice,[i]); double slowMaV = iMA ( NULL , 0 ,slowMa,slowMaShift,slowMaMode,slowMaPrice,[i]); Hello, I need your help guys how to make the variable ...[i].... an array variable so i dont have copy the code multiple times for each
I have an Expert Advisor which is operating on multiple pairs. The problem is that when i close positions, from time to time i get repeated 136 errors ( off quotes ). I'm getting Bid Ask through MarketInfo; since RefreshRates() is totally uneffective, how to update the prices for a specific symbol?...
My MetaTrader has randomly started missing numbers and words, the journal is also blank meaning I can’t see what the actual problem is (see attached photo) if anyone knows the problem because this has never happened to me before
Hi Sorry I am new to MQL4 and trying to understand it I would like to sum open values of 9 previous bars. I confused using Bars of iBars. Anyone has a clue? Thanks
Hi, i have a magicnumber e.g 10055 or 100555. How can i get the last 2 or 3 numbers from that big numbers
Hello folks, I should need to use slow stochastic in a new strategy I'm testing Re the MT4 , Is there separate indicators for slow and fast stochastic individually, than what is available in the MT4?. If so please give me information. If not how to use the available stochastic indicator to get the
hi all i'm trying to code the following condition (as below) I want to place an arrow the first time stoch crosses upwards the 50value, after sma20 crosses above sma50 What i've managed to code so far is showing up only when it happens all together presumably because the condition is all set in a
[Deleted]
Hi all, I'm fairly new to mql4 so I'm having a hard time with this and any help would be greatly appreciated. I'm looking to move my stoploss only when the price reaches x amount of pips and then again when that same amount of pips is reached again. So example: buy at .67000, price reaches .68000
Hello, wiht MT4 build 1294 installed on win10, I was just testing WebRequest to receive super simple response from server on local network. Header response is always 200 and everything is OK unless result variable is always 0 length. I have tried everything!!!! Firewall, different servers and pages
void OnTick () { //--- if (!CheckIfOpenOrdersByMagicNumber(MN)) { while (isNewBar() == true ) { if (High[ 1 ] > High[ 2 ] && Close[ 1 ] < Close[ 2 ])//reversal params { Alert ( "Going short. Reversal Bar." ); double stopLossPrice = High[ 1 ]+ Point ; double