MQL4 and MetaTrader 4 - page 1095

To post a new topic, please log in or register
Hi everyone, Maybe you guys can help me.. So I assign a global bool variable at the beginning of my script and assign it to false.. But when I run my start function in the tester though, it treats it as if it were 'true'.. I'm probably missing something pretty basic. Would appreciate your help.....
Hi, sometimes I need to compare 2 EA Usually I copy/paste into notepad, save as text and then run some text file compare program. Is this the best way? Thanks
Hi, I'm trying to code an automated alert but my problem is that its triggered only after the candle closed, and is not using actual tick data from an unfinished candle to trigger the alert. the code I tried is like: RefreshRates(); if ( Bid >= Alertlevel) { Alert("Alert"); } I tried the same with...
So it appears that Sleep(), does not work in backtesting. I need to find an alternate, the testing bogs down doing useless calcs. Working on a 4 hr TF I don't need to evaluate my SL on every tick, once a minute is adequate. Any ideas on how I can do that without using the time functions? I can't...
Hi, Is it possible to hide indicators or not display them on a chart? Imagine you want to distribute an EA that assists the trader only signals by displaying arrows. Trader opens and closes positions from EA signals. EA calculates positions from many indicators (so this indics are in mt4 exp/ind...
Hi there! I know I know I know, you've probably heard this one about 1000nd times before, but still, please help me out, it's really driving me nuts I tried opening a new account with leverage 20, but upon checking the account leverage using the function FileWrite(handle,"Leverage:"...
Hi All, Im finishing my thesis on the web and forex, and part of the thesis is a small questionaire, I need as many responses as possible, but to achieve that, I need people who are willing to coorporate :). The questionaire is web based and only takes up to 5 minutes max. Anyway, I am an EA...
Hi All, Ive been trying to figure out what is wrong with my code below. Basically, I want to modify and order's stoploss once it hits a desired price. Please tell me what i'm doing wron.. i've read it over and over a lot of times but still can't get it to work. I'd really appreciate your help. =)...
So I was finally able to get the EA to read GV's from my custom errors thanks to the help of you fine folks :) I'm struggling with some back testing on the strategy tester. I can see that the custom indicator is changing the GV value, so I know it is reporting it to the terminal in the back testing...
I am as well having a problem with scalping the EUR/USD using the 5 & 15 charts. I need a better scalping technique to be able to exit the market with positive income.
Hello, after optimiser.ini is copied to the tester folder, what shall I do to run the tester from an external program? just run terminal.exe ? Does terminal.exe take input variables like "terminal.exe param1, param2 ..." ? thanks
I've been dabbling in FX for a few years.... sometimes a lot more active than others. I've gotten back into it again and am currently coding a mini MQL4 emulator in VC++ to help me with logic bugs that always creep into my EA's that take forever for me to find in MT4. Instead of doing something...
It appears that when I call a custom indicator from an EA in the tester using iCustom -- everything works perfectly -- but When I drag and drop the custom indicator into the tester "session" -- (the currently executing test) - the indicator does not recognize that it is in fact in testing mode - the...
The system is listed below which utilizes 5 second timeframe. It works but you can go crazy watching the market this close. I was wondering if someone could figure out a way to make an mt4 indicator for it. i think it would be pretty dificult but someone says that they already have done it but wont...
Hi, I am a newbie to MetaTrader. I simply checked out a few indicators for building an Expert Advisor in order to start my introduction to the MQL4 language. I found the juice indicator, which produces a grren/red histogram. You can find the indicator here: http://www.extrafast.onpw...
I'm calling this function from the EA's deInit, But none of the objects are deleted... Any idea why ? //---------------- DeleteInfoBackground -------------------------void DeleteInfoBackground() {//Objects created has names like: RecW11, RecW12, RecW13, etc..//But for some reason they won't be...
I'd like a way to move a value into my variable called, "SAR_DIRECTION" so that when the dot is on top of the candle it will move in the value = "TOP" and when it's on the bottom of the candle stick it will move in the value = "BOTTOM". Is there a way to do this?
start() is the basic function. For experts, it is called after the next tick has income. For custom indicators, it is called at recalculation after the indicator has been attached to the chart, at opening of the client terminal (if the indicator is attached to the chart), and after the next tick has...
Can anyone help. I have 2 Stochastic bands on my chart with different LEVEL settings. I save the chart as a Template but when I re-open the MT program the settings have changed back to default? Does anyone know how to retain these settings?
Hi Some one told me there is an EA that uses the Kolachi method written in MT4. I have searched this site but no luck. Does anybody know where I could find it? Otherwise I will have to write it myself. Thanks
Hi Everyone. I am a newbie to arrays. Is it possible to initialize an array with variables. When I go: int xxx[] = {1,2,3}; There is no problem, but if i go: int xxx[] = {A,B,C}; it says '}' -comma or semicolon expected. What am I doing wrong? Thanks
Hello, I am having a problem with all my EAs (that I've tested) using iCustom in the code today. For some reason while backtesting, the indicators are loading and unloading the indicators today while they worked perfectly fine for months up to today. I am using them in various timeframes that differ...
Why does MT4 build 224 Display an Alert in the Experts Log, but not display the Pop-Up???
i'm coding an ea that work by 2 time frame, H4 and H1.it read the trend from H4 and then look into the H1 trend, if they are the same the ea will place the trade in that direction. i tested it in the strategy tester by 1 hour period scince 2008. it placing trade ok but till 2009/02/10 it didnt place...
Hi, I would like to have a popup alert when three moving averages crosses up or down so if you can program and want to help me with the task, please send me a pm and we will talk more :) Have a nice day, Rikard
Hi all, am trying to add MA to CCI so I have a moving average of the CCI indicator. Any ideas or point me in the right direction. Cheers, S
fftremblay
Hi, I need your help. I have an EA which runs on several live and demo accounts (differents brokers) - The EA works smoothly except with the broker FXCM, no positions are opened and I don't have any error messages. I don't understand why - Did anybody have a similar problem once ? Is it possible...
While testiing on the Visual Tester I noticed that Bid returns the actual Bid from this past Friday instead of current Tester Bid. Not sure what the problem is here. Is it becuase the market is closed? MarketInfo(Symbol(),MODE_BID) doesn't help. This is pretty silly. Any workaround for this? PS....
Is it possible for me to use, for example, the iRSI function below... RSI_1HR = iRSI(NULL,PERIOD_H1,14,PRICE_CLOSE,0) and compare it to: RSI_4HR = iRSI(NULL,PERIOD_H4,14,PRICE_CLOSE,0) even though I'm running this on a 1 HR chart? If I ran a "Comment("RSI_1HR, RSI_4HR) and had it run on my 1 hr...