Download MetaTrader 5

MQL4 and MetaTrader 4 - page 566

To post a new topic, please log in or register
Hi, I am trying to code my EA to check if my signal has already appeared in current trend so that I don't enter a trade if its not the first signal in the trend from a custom indicator ""BullPips_CCI"'". Any ideas how I could do this? Trade Entry Part of my Code: double BullPips1 = iCustom(NULL...
Developing a successful strategy is one of the most agonising tasks that a trader can undertake. TradersNow started its project years ago with a mathematically sophisticated algorithm to predict the markets. Yet, even with the advantage of a mathematics professor and a team of market professionals,...
Hi all. I'm trying to program an alert that goes off once volatility is greater than 3 times ATR. I have almost everything taken care of, but I have a stubborn bug I can't identify. I have included a time stamp as a global variable to try and make sure the alert can only go off once every candle...
I have an OCO EA where it doesn't take the trade because it seems that price containg to many digits. Error in the 'Journal' tab: 'invalid price 1.59805567 for order send function' (i'm using 5 digit broker) Here is the code that should send the trade order and below that is a function called...
I try to build a newstrader EA w/ FFCAL, the problem is ffcal operates with any news ... is it possible to modify ffcal filter (display) the news for the attached symbol only?
Please what should I do to make my EA work this manner; To open position on H1 chart base on the signal from indicator on H1 chart and close the opened position using the signal from indicator on M15 chart. Thanks.
Hello All, I am reading the book section above. Im at the section "Opening and Placing Orders". there is a code named "simpleopen.mq4" and some more based on the same logic. int start() // Special function start() { // Opening BUY OrderSend(Symbol(),OP_BUY...
"MACD-Cross" EA place order upon Cross of 2 MA Lines. while in additional windows it show a horizontal line which value of zero. What is the name of the horizontal line? Do we can create an EA base on MA lines above horizontal line then BUY or vice versa? Any Example?
How to ensure the EA will automatically initialize automatically when a new tick made? I searched the forums for this and did a Google search also, no results that were relevant, no doubt a hardcore user or gatekeeper on here will find a thread that is related though, one that does not help me! No...
I want to know whenever we draw any trend line & if want to appear current value of trend line for current candle, is there any provision about that in mt4 to appear the value plz help me about that I want it to appear it constantly on screen with current candle without putting my cursor on candle...
Hello, I have a MACD two line indicator that I'd like to have some alarms added to it. I'd like to have it both pop up a window and sound an alarm when the blue MACD line crosses a zero level. Here's the indicator code. #property indicator_separate_window #property indicator_buffers 3 #property...
Is There indicator that can show history's market session time exactly? the indicator can detect whether history time is in daylight saving time or not. (US daylight savings is different from UK daylight savings time) Not this one : https://www.mql5.com/en/code
Hello I have deleted trader toolkit in navigation box under expert advisors. Can i add it again. Pls help me. Thank you
Hi, I am VERY new to MQL4 coding and have just been mucking around really, looking at some of the articles and the book on here to see what I can learn. What I am trying to create is an expert advisor that opens trades based on fibonacci levels. I strategy is this: In an downtrending market, where...
Hello all, I need a help to correctly determine whether the last trade closed by it's stoploss or not. Is the code below enough? bool closebysl=false;for(int i=OrdersHistoryTotal()-1;i>=0;i--) {    OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);    if(OrderClosePrice()==OrderStopLoss())...
Hi, I have one dll that used by one platform(MetaTrader) and another exe file. I define one Public variable(PP) in header code and set value in MT4_EXPFUNC double __stdcall Reza(double ppp) function. When try call this dll from my exe it returns only Zero(0) value but if call from other...
My EA is opening many positions on a single bar, please, what should I do to it so that it will open a position per bar and will not open another position until the existing one is closed?
I am new in mql4. Can anybody tell me how can I get current MACD of GBPJBY in my C# application.
Hi MQLers, am I somehow able to detect a tick which starts a new candle / column / whatever? Background: within my indicator I have a piece of code which only cares about finished periods, so instead of having it run with every coming tick I plan to first check if an incoming tick 'falls' into the...
CPU occupancy rate is 10% only THE MT4 is me new install,not have Garbage test data
Hi, I recently installed MT4 (Oanda) ver 4.00. build 438 on a win7 64 machine. I installed in a non-admin account on this machine as I do with all my programs. The program worked Ok for a few weeks but yesterday I had a computer crash while MT4 was running (the crash is not related). After re-boot,...
What are some of the better EAs that you dont need to know programming language for?
Hello MQL4 community, I have a condition for Boolean to be true or false. When the condition is met, Boolean is true, BUT ;) when the condition changes, Boolean is false. Does any coder have any ideas to keep Boolean true even when condition changes in the future? example: Indicator now meets...
Hello, I have an array with 4000 values and would like to find the 10 (or X) highest values in that array, not just the highest. I am really not sure how I would go about that. Can anyone help please? Thanks.
Hi, I'm looking for some input on this from people who already did it or have an idea of how to do it. I don't want to use moving averages because of the lag, I'm looking for a natural method, that uses the same parameters as people do when looking if there's a trend or not. So I was thinking of...
Hi, I´m new in trading, I have a problem with expert, I put the eworkxpert but it doesn´t work but the face is happy....and the rest of parameters are ok, thanks in advance....
spread used by strategy tester is very critical to an EA I am developing. Strategy tester uses the live spread if the market is open and when market is closed it uses closing spread based on the last bid and ask quoted by the broker. Some smart brokers even when their normal spread is like 1.5,...
here is my code: int start()  {   int    counted_bars=IndicatorCounted();   int handle, _GetLastError;   string File_Name="spreadandbar.csv";   int time, count;   double spread;   datetime time_chk;      handle=FileOpen(File_Name,FILE_CSV|FILE_READ|FILE_WRITE,";");      if(handle<0) // File opening...
hi all, need help to display an arrow when a pending order say stop buy/sell is triggered . my EA is showing the stop buy/sell order on chart but there is no indication when it is triggered (stop buy/sell turns to buy /sell ) . i can only verify this via the account history or Trade tab. thanks...
Hi, I have a problem with GlobalVariableGet() function. I define my variables in this way: string count_long = StringConcatenate("count_long_",Symbol()) ; GlobalVariableSet(count_long,1) ; The expert runs on different pairs. So I obtain “count_long_EURUSD”, “count_long_EURJPY”,...