Hi Guys... Can any of you give me a few pointers on how to reduce my EA's RAM... specifically Indicators that I use on my GUI ( Graphical Interface )... Most of my heavy "lifting" is done with Arrays and Global variables...but,... I have a GUI that is split into 3 - Chart "0" - the main MT4 chart
given the following two arrays: string symbols[]= { "USDCHF","GBPUSD","USDJPY","EURUSD","AUDUSD","USDCAD","EURCHF","EURGBP", "EURJPY","EURCAD","EURAUD","GBPCHF","GBPJPY","CHFJPY","NZDUSD","NZDJPY", "CADCHF","EURNZD","AUDJPY","AUDCHF","AUDCAD","AUDNZD","CADJPY"," USDSGD "
Greetings! Would just like to ask why when I backtest using the parameters of optimization, the backtest results are radically different from when I optimized it? Did I miss something? Isn't it that optimization is akin to a backtest en masse? Spread is fixed. Basically all i did is uncheck the...
hi ..am traying to find the highest high among number of candles using the function iHighest and iHigh first i used a loope for(int i=shif2;i<=(shif);i++) and want to find the Highest High within or between shif and shif2 using the code double Highesthigh = iHigh(NULL,0,iHighest(NULL, 0...
hi why the mt4 dosn't remember my last use all ways have to setup the tools and all the other helpers
Hey, Is it possible to edit the iFractals function. It returns previous values based only on 5 candle tops and bottoms. 2 lower candles either side of high. Can it be edited to return a previous fractal value of this with 3,4 or 5 candles either side of the fractal ? My suspicion is as it is a built...
Hi I wrote a function for set SL equal to OrderOpenPrice. It is working but in strategy tester Journal I see many errors befor and even after this action . would you please tell me whats wrong? void RiskFree() { bool result; for(int i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i...
Hi This code needs to open/create a file to write in, so that the content of the file will ONLY have what is being written by this code. GetLastError() is reporting 5011. Could some one please show why and how to fix it? The docs says File must be opened with FILE_BIN flag, but I want to write text...
Hi guys, i had problems with one of my EAs, after normalizing prices i still got outputs like this: I dont know why this is there, considering all prices are normalized.Ill send my code, if someone could help! Thanks double stoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL)*point; double...
Hello everyone, I would like to know how I can to send another pending order after the previous order becomes a real order. Look the example extern double Distance = 20; OrderSend(Symbol(), OP_BUYLIMIT, Lot, Ask-Distance*Point, 1, 0, 0, "comment", Magic, 0, CLR_NONE); When opening a BUY order,...
Hi guys, I recently tried my EA on a new MT4 platform of a new broker (FXCM) and aparently their system doesnt accept the OrdeCloseBy function. It returns "error 3" I tried all possible settings to avoid the problem without success. My EA works fine on more than 10 other MT4 different brokers and...
Its from their liquidity provider from back then? MT4 backtester proceeds to "model tick data" since before there were ticks on the broker? I just want to gather raw tick data from my broker from as far back in time as possible. 1m frame only goes for six months, so I decided since I only need the...
Good morning, the editor gives me the following error: “notall control paths return a value”. Do I need to place return(0) at the end of every “for” “if”and all other functions? For instance, where do I place return(0) in the code below? Thank you! for(cnt=0;cnt<=total;cnt++) { if (...
Hello dear fellow traders and coders, good day/night. I created this post because i turned on my pc today and opened my MT4 to continue working in some projects and it asked me to update, wierd at first but i did. afterwards i found out this: Did they update MT4? If yes, how do i find out the new
This EA is based on the "Forex Gladiator" strategy which was available for free download from the author a couple of months ago. Here's the basic strategy, it's a counter-trend system: BUY- Close must be above both the long term and short term SMA's. Close must drop down within n-points...
Hi, I want to select the newest order. Following code is for searching all orders? How can I modify the code to select the only one order (newest one) ? I want to select only the newest order to compare the price, etc.... How can I know the newest order information? I want to know OrderOpenPrice()...
I made an EA so that if the profit is above 0 the order is closed. But the order is still being closed even if the profit is negative. Why is this happening? OrderSelect(OrderA,SELECT_BY_TICKET); Alert(OrderProfit());// It does alert a negative profit if(OrderProfit() > 0)...
Hello. How know I closing ticket by stop loss? or mql4 have any event about close ticket by stop loss ? I'm not good English, so I draw simple cartoon for your understanding. Thank you !
I have made an indicator that notifies of EMA in the M1 chart based on the status of MACD in a M15 chart. This doesn't work when I have contradicting timeframes within my indicator. e.g. signalemabuffer[i] = iMA(NULL, PERIOD_M1, SignalEMA,0,MODE_EMA,PRICE_OPEN,i); mediaryemabuffer[i] =...
Hi, I'm trying have an open order close, but i get an error saying "invalid lots number for OrderClose function." The same happens for the ticket, "invalid ticket number", unless i save the order as a variable. I imagine there's something obvious that I'm missing and would really appreciate any help...
Hi - what's the best possibility to trade based on levels given in a spreadsheet with the following information; Pair, Trade direction, Entry level, Stop loss level, Distance to current price from entry level (based on Google Finance, could possibly make the EA read the current MT4 market price...
Hi Looking for assistance with EA. I am new to MQL4 code and have done what i can but can't work out what i have missed or done wrong. Orders are opening as they should and closing at expiration time. Orders are not deleting on activation of opposite order and order modify for stop is not working...
The following is the code: if(distance<MarketInfo(Symbol(),MODE_STOPLEVEL)+5)distance=MarketInfo(Symbol(),MODE_STOPLEVEL)+5;if(CheckMoneyForTrade(Symbol(),startposition,OP_BUY)==true&&IsNewOrderAllowed()==true) { if(open=!OrderSend(Symbol(),OP_BUYSTOP,NormalizeDouble(startposition,2)...
I want to make each day open, the ad is loops (Hedging style) The values used to open orders on a daily basis are not equal, they are the values of the day. Some days to order to go to another day. For example: Makes the next order opening time in the first day's loops take the value of...
Hello! In an EA, I modify the SL and then I want to return the new stop loss as the following: current_SL = OrderStopLoss(); But I got the original SL (before modification) into the current_SL How can return the new OrderStopLoss() into the current_SL Thanks. PS: I defined the current_SL as double...
Hello, I am pretty new to mt4 and have limited understanding of what is possible code-wise, so if I ask about some impossible stuffs then simply say "no can do.". 1/ Would it be possible to color tabs in mt4 based on a simple yes/no condition ? ( the tabs I mean currency listing letters that are...
Hi LTF was 60m and then it changed to rubbish value: https://i.imgur.com/bqt4Vjj.png Also when I copy all to excel, some values are corrupted: How to fix it? https://i.imgur.com/1Q9vcBQ.png
void OnTick() { datetime candletime=0; datetime currenttime=0; currenttime=Time[0]; double K_line=iStochastic(NULL,0,20,3,5,2,0,MODE_MAIN,1); double D_line=iStochastic(NULL,0,20,3,5,2,0,MODE_SIGNAL,1); double pK_line=iStochastic(NULL,0,20,3,5,2,0,MODE_MAIN,2); double...
<I would like to test from the Candle which is assigned randomly.> 1. However when I open the HISTORY from the TOOL of FX, it shows like below, ASKING : ***IS THERE ANY METHOD TO SEE THIS LETTER TO BE CORRECT LETTERS? (ANSI and UTF-8 is same result. Do I need to download any letters?) 2. If you tell...
Hello, I place an Order, but I get the Wrong Order open time. Can someone tell me, where the error is? My code: if( OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,(Bid-0.0003),NULL,0,0,Red)) { Print("SELL order opened : ",OrderOpenTime()); delTimeOpen( cnt...

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.