MQL4 and MetaTrader 4 - page 251

One order tp hit to closed. Then all open order closed ea mt4? how can i do this ea
Hi all is it possible to change the arrows for the orders/stop loss and take profits? I know there's the index/arrow options but I can't seem to find anything within the ordersend or ordermodify parameters. I'm only finding the color, not the type of arrow and size (+color) also if possible i would
Hi everyone, I would appreciate any help you can offer with an EA I am writing. The EA I wrote gives me a signal while a candle is open while I only want the signal to be provided after the candle closes and can't seem to figure out how to code for this. Intent: Using CCI levels. Give sell signal
Hi, I am struggeling with my code. I want to set Stoploss to break even as a start of a trailingstop. For BUY orders I only get error 1 all the time. (Not for SELL, there it works like a charm) I cant figure out what Im doing wrong here. Can I please have some assistant? Thanks! void SetTrailing() {
Hello, Could someone tell me how to fix this code please? It's exiting with an invalid pointer after the Update operation. #include <Arrays/ArrayObj.mqh> //+------------------------------------------------------------------+ //| |
Another attempt at coding to miss out days prior to NFP. The code compiles and the logic seems sound but if i set the tester to run this bit of the code it does not trade at all rather than missing the days tested for. Is there an obvious error anyone can see. // Code to exclude Days Before NFP if
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