I've been trying to access one currency pair (EURUSD) values in an indicator of another one (USDCHF) but have been running into problems.
I've tried ArrayCopyRates() method. The data returned in the array at any index 'x' does not correspond to the data at index 'x' of the working currency...
I I have two accounts , and would like to trade the same EA in both, What can I do?
and also If in each of those accounts I would like to trade say 4 currency crosses, each
EA1 for EURUSD, and GBPUSD...
EA2 for CHFUSD
EA3 for JPYUSD
same as Account 1
On the metaquotes.net site there used to be a MQL II code for trading multiple charts with one expert advisor. I can’t seem to find the old FAQ MQL II or a replacement for the new MT4.
The old code was:
for cnt=1 to TotalTrades //count opened order ,a pair currency only one trade...
Sometimes I have a freeze of the chart (the chart do not refresh). In that case If I use the home key in the chart to receive new datas it becomes OK. But if I am not in front of my computer my expert do not trigered. I use both MT4 demo and i n t e r b a n k f x demo with 1H chart 24/24....
i am trying to get the time of a 4hr bar, i have tried some of the DateTime functions but i get thing like 20,000 seconds etc lol i am trying to get 00:00, 04:00, 08:00 etc, the same as when you look in the inspeact window and it gives you the time. any ideas ? thanks
I found a cute little bug in the Strategytester. I think everyone should be aware of this. Even if you catch err, it does not show.
i have read posts here that say one thing, and my broker says another. Does strategy tester work in mt 4 ? does it work for 'mini' or all? is there any demo strategy tester that works that we can test our advisors before using real money?
Use first code snippet:
- Check "Whole word only"
- From: i
- To: shift
Note the "PRICE_CLOSEshift shift" in the first (and other) lines of the result.
ma20p = iMA(NULL, PERIOD_M30, 20, 0, ma_method, PRICE_CLOSE, i); ma20p1 = iMA(NULL,...
A small thing. If you try to place a limit order with an illegal price (e.g. Limit Sell with a price below the current price), the error messge says "Invalid SL/TP" instead of "Invalid Price".
Also, it would be nice if the price for the Limit would be pre-filled with the current Bid/Ask so one...
One thing that is quite high on my wishlist would be a way to easily set the TP/SL based on a pip difference for a manual order. Something similar to how it's done when modifying the order. I can see the problem in this because you'll need to know if it's a sell or and buy...
Hi, No ability to pass parameters to external dll by reference - I get null pointers inside the dll (using the debugger). Workaround is using arrays - but it is not so nice from a programmer point of view. Slawa, when this functionality will be available? Thanks Ruby
i am writing a very basic expert so i can get used to writing code. Basically i buy when a bar is higher than the previous high and close the position when the bar is lower than the previous low. i can get the buy to work, but i cant close it and i keep getting this error : " invalid ticket for...
I am using a demo account for my code which is based on MT3 API. I used the code one year ago with, of course, another demo account. Recently, I have had connection problem with the code. Always connection fails though the demo account works with MT4 trading station. The server and port I am using...
I'd like to be able to easily get the lotsize and the dollar value of a single point from within an expert.
Reasoning: With brokers beginning to define lot sizes outside the norm (i.e., instead of 100000 units being 1 lot, some brokers are defining odd sizes, such as 70000, as 1 lot), it...
Just un-installed Metquotes and then rebooted and downloaded the latest version and re-installed it. But when I go to open an account it is set to InterbankFX server and not Metaquotes
What is the Metaquotes Server?
I have a program that is allowed to open several positions at a time. From time to time I want to close all open positions.
I use the following loop. It works, but the problem is that it takes several ticks to close them all. Shouldn't this loop in this example go through all open positions and...
Hi, I was using the "OrderSelect(1,SELECT_BY_POS);" function in MT4 and I noticed that this function only works if there is a space after the commas. So OrderSelect(1,SELECT_BY_POS); does not work, but ] OrderSelect(1, SELECT_BY_POS); does work. If a programmer forgets to include a space here this...
Hello, Why has MetaQuotes only used the start() function in MACD sample, whereas when I open a blank Expert Advisor ready to start programming in, it shows the start(), init() and deinit() functions. Why are the init() and deinit() functions missing from your MACD sample? Thank you. RJF
What format MetaTrader expects when importing data in the history center? I point it to a file which i just exported from the history center and it shows nothing in the data pane below... If it's own export is not good, what is?
I am posting this for a friend because he has not yet been given forum access and he wants to get started with Metatrader!
>>Please can you help with this. I am getting the crash report below under the following conditions:
1) Install Metatrader trial- OK.
2) Program displays 4 charts - all OK...
Explanations made by Matthew Kennel Here is a modification of Mindagaus' v034 TSD EA that I made. It has options to choose new entry locations, in addition to the original O'Brien one pip above/below high/low.. They are entering on what I believe is Jacob Yego's rule, and another on "Camarilla"...