I have a very simple question. I want to buy EURUSD and close by Takeprofit or Stoploss.
My code open the position but never close. Could you help me a little?
There are quite a few things to relearn in MQL5. Sometimes its a struggle. But there are also great benefits. One feature i absolutely love is the "struct". It makes returning several different values and data types from a function so simple and elegant. Kudos.
Hello eveyrone (and merry christmas !)
I'm really starting with mt5, so I don't have much knowledge. I guess it will appear as a very basic question, but here it is:
Let's say I want to create a robot which will will automatically buy EURUSD and then sell it after 1 hour. And then repeat that....
Creating a new library with a simple test function and use it in an EA does not work now. Some month ago I converted a MQL4 library containing a logging funktion. It still works fine except that it does not work to add new functionality to it. The new function are not found. The log function still...
I'm new to using Robots - but I have added 2 Robots to my demo FXCM Metatrader 4 platform (Best Secrets EUR/USD & GBP/USD) - I have smiley's in the top right hand (chart)corners - but thet are not trading? In the navigator both robots are greyed out ? Any advice please?
Hello I am working on developing an EA, but have trouble with getting the right number of deals.
My EA needs to detect when there is an open deal and prevent it from getting another order or deal through, but I cannot get the number of deals or detect if there are any open deals? Can anyone advice...
I wrote an EA and I use iCustom
function to get information from an external indicator. The problem arises when I've to get information of the las 30 bars or more. So, I write:
double rm00 = iCustom(.....)double rm01 = iCustom(.....)(...)double rm030 = iCustom(....)
if the indicator has more...
Hi, can somebody please tell me if this tutorial on access sql database from metatrader would be compatible with an MQL4 script ( and SQL server 2008)?
originally written for mql5 but my script is in mql4 can I just implement it anyway?...
So I've written a pinbar EA which works fine, however I'm now trying to get it to take RSI into account when making trades...
I basically want RSI(specific bar interval int) to return the RSI value at that bar based on Close Prices.
I've been struggling with this a great deal as I'm having...
i create my first EA.But its not corectly work with indicator.Its generate every thick buy and sell signal without any reason.
how can i fix this EA?he only get signal buy or sell if the line is crossing for example.i try with different indicators and its always the same problem.
I wonder if anyone has experience with connecting MT5 to Interactive Broker’s TWS through API and using an EA for trading with all sorts of financial instruments not just FX? Any help would be appriated.
First of all sorry for my bad english.. hope you'll undestand..
Probably there are many others methods for send message on your Twitter account directly from your MQL5 code... but this is my solution! :)
I have coded a very easy program that allows you to send message on your Twitter...
I'm trying to trade on GBPUSB and EURUSD with a custom EA I created. It is succesfully trading on GBPUSD but not on EURUSD. It is the same EA with the same settings on both pairs.
I don't see any message in the journal or expert tabs regarding EURUSD but I can see GBPUSD trades taking place....
I'm starting in using MT and I know that MT5 is able to make automatic trading. This means that you code a program that can open and close buy/sell operations for you respected to some parameters that you've previously coded in the program.
Now I've the same question for MT4. A friend has clarified...
Im not very good at coding
Im having problem with an EA
The problem is. It only opens one order at the time.
I have tryed set the OrdersTotal();
But if i set the orderstotal to 100 for example it opens like 5 orders at the same price. Thats not what iwant!
This is how i want it to...
I had a very helpful member (credit goes to heelflip43) from the MQL4 forums modify a lousy data collection script I found laying around. He did a great job and I think its now a very useful data collection tool. It continuously writes multiply currencies and multiple frequencies to .csv...
I wanted to play with the example from
MQL5 Wizard: How to Create a Module of Trading Signals
and wanted to implement it in my own EA; unfortunately I get the invalid pointer access in 'SampleSignal.mqh' (151,20) in the file
a strange thing: I have an expert advisor which works fine in MetaTrader 5.00 build 527 but it doesn't work in build 540 (same machine).
I have double checked that I test with the same code. In Build 540 I get the following error:
2011.11.14 18:26:18 Core 1 2010.01.26 16:06:28...
I have written an EA that need to write ad read data from a text file... when i use in live i have no problem but if i want to use in Tester i have some problems with the Text File...
AT THE END of the test the file is written in : tester/Agent/MQL5/files/myFile.txt , but if i want start a...
up to now the Strategy Tester worked fine but today - suddenly I´m receiving this Error Message and I don´t have a clue what it´s about. Can you pls help?
2011.11.08 08:09:11 2010.07.06 14:55:00 Access violation read to 0x00000E49 in 'C:\Programme\MetaTrader...
I am looking for an EA that have time setting(hour, minute, and seconds) that I can set to be trading at any time that I want. It will have lot size setting; buy/sell setting(meaning during the time I set it to trade if I want it to go BUY or SELL); stop lose and take profit setting, and can work on...
Anyone could help me with this?
I`ve done a simple EMA Cross signal, after that I used MQL5 Wizard to built my EA...
When I try to run the EA it show the following errors:
CExpertBase::SetPriceSeries: changing of timeseries is forbidde
CExpertBase::SetOtherSeries: changing of...
MT4 shows in the chart the indicators you use in your ea during baciktesting. MT5 does not show any indicator - it only shows the trades (both in normal and in visual mode). Am I missing something? Is this feature already available in MT5? It's harder to backtest if you have to add your indicators...
Hi guys how are you. I'm wondering if someone could help me out to finish this simple OCO EA.
Basically I want to cancel other trades based on their TICKETS. So basically we have two limit orders. Once one of them triggers, the other must cancel.
extern int Ticket_1;