Download MetaTrader 5

MQL4 and MetaTrader 4 - page 964

To post a new topic, please log in or register
Hi, I wrote an EA that I want to be trading at a specific hours. The condition I was using was: if(Hour() > 8 && Hour() < 18) { // buy, sell etc } It seems never to go inside the brackets. Any ideas why? When I leave the condition out, trades are performed few times every hour so there is no...
is there an EA available to test Bill Williams Chaos system that uses 5 market instruments for trade, including Alligator, Gatorr, AO, AC, and so on. I know these indicators are available separately, but i JUST want to test an integrated EA if its already available.
Hi everyone, Please how can i make my EA to enter and exit a position at any time,as long as the price is moving, instead of at the open of a new bar or candle.? thanks for your usual cooperation.
How can I go back and check at what time my last order was closed and use that info on wheather I should proceed with my buy signal? OrderSelect (cnt, SELECT_BY_POS,): if(TimeCurrent() - OrderCloseTime() > timecheck) { Continue; } This doesn't seem to work, the orderclose time is printing as a...
I want to program functionality into an EA so that it can effectively abort, for example if there are no open trades. I tried return(1) rather than return(0) but that has no effect. Is there a "die and don't get reborn on the next tick" type of feature possible, or would I have to fall into an...
Hey! Ive been learned for weeks then wrote my first EA that is works great in tester, however the demo account is failing all the times. The thing is that it set to check for a certain Profit value, then stop the Order. Well, it does in the tester as it should, but something is definitely wrong with...
When writing an EA we often need the values of indicators to base our decisions on. for the standard indicators we can easily use the built-in functions such as iMA, iFractals, iCCI, etc. For custom indicators I know of 2 ways: embed the code into your EA i.e. duplicate the indicator calculation in...
Hi Im a total disaster in programming but I have a great idea of finding reversals, overbought / sold areas for entry points and a profit take (which is the hardest in trading) philosophy to reveal in exchange for a simple MA-based Alert system, i.e not Automated trading. The trading is still up to...
I went to a forex preview & the coach show their fantastic live trade record. They use this indicator to see the daily trend. On everyday GMT0, we just need to see the bar's colour. Blue is long, red is short. We close position when change of colour. Life becomes very easy if we can only manage...
There has been a critical error Time : 2009.10.26 16:03 Program : Client Terminal Version : 4.00 (build: 225, 10 Jul 2009) OS : Windows Vista Professional 6.1 (Build 7100) Processors : 2 x X86 (level 6) Memory : 2097151/977644 kb Exception : C0000005 Address :...
My custom indicators are disabled and i could not insert in chart there is no error when compiling But if i changed the name of indicator then it works I don't know what happens please advice me As shown in below picture Thanks Advance e
Is there a way in MT4 to have an EA programmatically load a presets file and reinitialize itself? RS
Hi, Ive tried backtesting on 5min timeframe on two different mt4's. One for interbankfx and one for ODL. Both will only allow me to go back about 3 weeks back. If i try to back further i get a blank screen saying "waiting for update". Is there any broker who lets go further back and backtest months...
Hi, Does anyone have an indicator that will show the bar or candle of another currency on the same chart, in a separate window? For example, I would like to show GBPUSD on the top and EURUSD below, but on the same chart, so I can scroll the one chart back and forth and keep them in sync. Thanks,...
Hi there, I'm having an issue with part of my code : I'm trying to close all open and pending orders, unfortunately it deletes the pending orders and closes only the first open order. Would a Refreshrates() inserted in the functions solve the problem ?? Thanks. while(MyOrdersTotal(Magic)!=0)...
Jens Sigvardsen
Hi I want to draw straight lines from lets say the closing price of index 100 to the closing price of index 20. How do I do this, without calculating all the values in between? If I give them no value, the indicator does not show anything. Thanks in advance
Hi, I have an EA that operates in multiple pairs in real time without problems, but when I try to test the strategy it returns an error for every market but the one which graphic is open (IIRC, something as "unknown symbol name EURJPY for OrderSend function" when eurjpy isn't the one opened). Is it...
Hey there, I would like to determine the slope of the MACD Signal line. However, this slope also depends on what the current maximum and minimum range is on the MACD indicator window. I would prefer NOT to set the max and min values on the indicator. Instead, I would like to (in my EA) read what...
Good day, Can anyone help me with a simple code to know if the last order closed(manual or stop loss) is profit or loss? I am trying to learn how to make a martingale EA that only doubles the lot if a previous order was a loss then reverts back to 0.10 lot if it gets a profit. Thanks in advance.
Hi, I'm (trying to) add this code into an existing program. If I compile it without the code listed below, it’s just fine. But no matter what I do with this section of code I ALWAYS get the same error '\end_of_program' - unbalanced left parenthesis . I've tried adding some in parenthesis, as well as...
What's this: I wrote this script a long time ago, to help exercise and test my trading system, not with EA, but with manual trade.....Recently I find an EA (vhandstrade) out there, called Manually Trading, I say: it's just what I've done. And why use my solution? vhandstrade is so "real time"---...
  DOW EA (3)
have good profits.
Could someone please help me with iCustom indicator calls??? What I need is iCustom calls for each of the 4 lines on this indicator? For the Bulls Main line, Bears Main line, Bulls Signal line, and the Bears Signal line. I would really appreciate anyone’s help!
I'm trying to take the Keltner_Channel strategy below and utilize its bands in an EA but I'm having trouble with being able to reference the individual bands (like you can do with the bollinger bands) in mql4. So far I've tried, " KeltnerP =iCustom(NULL, 0,"Keltner_Channel",0,0,0); without...
http://www.myfxbook.com/members/lenovos10e/us-dollar-index/3322/Z0O6HP426oPPGnhopI8z
hi, i'm a new user of mt4. can someone help me to write a indicator of keltner channel applying on rsi? i'll like to create a indicator over another indicator. thanks all.
Hello I have an expert, in some special trades(I don't know the reason), Ordersend can not open the trade. It returns -1, but getlasterror() is 0. I can't understand what is the reason. Could you please help? this is a part of log file of this expert: Account balance=100004.00000000...
Hi all, Please i need help on how to get the value of Bollinger band indicator's middle band for my EA code. Any help would be highly appreciated. Thanks.
Hi all here, in our opinion, for an Scalping EA what will be an maximum acceptaple drawdown for live-testing? Thx for your comments and meanings
it appears that the reason parameter is not always correct in metatrader 5 for indicators. When changing the timeframe or symbol the value passed to OnDeinit = REASON_REMOVE. Shouldn't this be REASON_CHARTCHANGE? If I am incorrect how do you determine if the indicator is just being reloaded due to...