Expert Advisors and Automated Trading - page 98

To post a new topic, please log in or register
My broker says the trading server setting is done by MT company. The code is too long. Just this open-more-trades-than-code, does anyone encounter?
I am using OANDA's version of MetaTrader. I am coding an EA that requires real-time access to Oanda's Margin Requirements Rates.These rates are located here: https://www.oanda.com/resources/legal/canada/legal/margin-rates.  How might I access these rates in real-time? Is there a function already...
Hi all, I want to code an EA in MQL5 whichcloses a position after x bars (let´s say after 6 bars or after 6days in D1 chart) regardless of whether it's a win or a loss.Normally the position is already closed 1-5 bars after entry becauseof a trailing stop but sometimes not. Therefore I would...
Hi Everyone, The Developer of the indicator i'm using can't make me an EA right now. So i want to know if another person can use THIS INDICATOR to make an EA. It's an closed code Indicator. What i'll request from this indicator is simple : Direction of the channel (if it's going up or going down)....
My EA opening trades does not based on bars or other indicators. I just open trades which are in my EA settings, like : eurusd,usdjpy,audusd,usdcad,eurchf and trade direction for each. It should open 1 trade for each symbol I set. In the Demo account and backtesting (every tick and random delay...
Is it possible: With predefined stop-loss levels for buy and sell orders, risk per trade, etc. to somehow use voice commands with words "sell", "buy", "close half", "close all" where EA would then execute the trades? Can EA be connected with speech recognition apps or something similar?
Hi - I put a request in for programming but haven't had any response yet, so I just want to know if this is possible in metatrader 4: 1. I want to enter a buy or sell order at a specifi price level 2. I only want the order or trade to trigger if price is outside the Bollibands when it hits my level....
Hi there. to assist my automated trading via EA-s in MT5 I would need a database in which/from which I could read/write data using mql code. I've seen some posts explaining how to connect MT5 with MySql, have tried that, but it's a bit difficult, while writes to DB are straight forward, reads from...
Hi, ------------------------------------------------------- Question 1: somewhere inside position-managing parts of my EA, i need to close an open position. Since I have the ticket of that position, I can easily close it using standard class function Ctrade bool RES =  PositionClose(ticket,...
What is the cause, how to remove this ? JS      2       00:07:19.699    Core 1  2017.06.01 00:02:00   failed instant buy 2.20 EURUSD at 1.12470 [Trade disabled]QM      0       00:07:19.699    Core 1  2017.06.01 00:02:00   #error: strategy24.mq5::place_order. code=4756 bar=528466 price=1.12470000...
after clicking download on the expert that I want, MT5 opens up, but nothing happens. mql5.com is added under the experts tab in the options menu... What now?
Hello,  I have an EA written in mql5, everything works properly in both live trading and strategy tester. However some times when trying to update local buffers of the indicators the ea is dependent on, it turns an error 4116. This is totally strange to me as all the indicators were attached to the...
Here is the indicator which is returning the time remaining for the new bar: //+------------------------------------------------------------------+//|                                              CandleTimeStationary|//|                                                                  |//|...
Hi, I try to use a CandleTrail function on a simple MAcross system and it works but I have many [Invalid stops] errors and I don't know why. Can someone help me fix this problem? 
Hi all, I'm using the CTrade class to place a pending order and retrieve the executed price when the order gets executed, however I keep getting a value of 0. This is the MqlTradeResult I get : MqlTradeResult{  retcode:10009 deal:0 order:2 volume:1.47 price:0.0 bid:11766.129999999999199645 ask:11767...
Hi, I am trying to learn about Expert Advisory strategy tester. Just as a test I would like to calculate if I opened a position above the 200MA and then closed it when it closed below again or at say 50 pips and again for the opposite. Can anyone assist me in getting this to work on EA Strategy...
Hello Everyone, I'm developing my first EA. I got to write one, and it works perfectly well on the strategy tester.  My EA does the following: I specify a pair of currencies, say currency1 and currency2. When it starts, the EA buys immediately the currency1. Afterwards, it checks the conditions A &...
I am trying to create a simple indicator on Mql5 but i get an ERROR when i compile it... Could anyone help me please? int OnCalculate(const int rates_total,                const int prev_calculated,                const datetime &time[],                const double &open[],                const...
Hello, why when I connect the mt5 to the Metaquotes server is deleted the personal data history present in the folder Custom \ Symbol \ Ticks? Thanks for the reply
Hi everyone, Is there anyone that can help me with my problem on how to convert CloseAvg() function from MQL5 to MQL4? I got this from one of the samples from MetaQuotes.  https://www.mql5.com/en/code/316 double CloseAvg(int ind){    CIndicatorBuffer *buffer=At(0);//--- check...
I have thought that there might be some function that can get me previous Bid or Ask price similar to the one that give OHLC value. But I could not see any such function.    Please let me know how I can get the previous values of the Bid or Ask?
Hello, in my backtest result is see a relative drawdown maximal of 24.24 %. The backest is over 259 trades. The problem: I can't reproduce this value visually in the equity, balance curve. Find attached 3 files zipped : The backtest results in numbers. An image of balance curve and a screenshot...
Hi all! Thank you for looking at this thread. I'm having an issue where an EA keeps removing itself from a chart on tick. It occurs when I add a function to my main EA script. The function is down below. Any help would be greatly appreciated, this is giving me a real headache!...
Hi there, I try to use iMA. This is my configuration: int MA_Definition1 = iMA(symbolName, timeFrame, 10, 0, MODE_EMA, PRICE_CLOSE); For a Buy or Ask decision I need the distance between EMA-curve and Ask- or Bid-curve. 1- Is ENUM_APPLIED_PRICE based on Ask- or Bid-price? 2- What is displayed on...
Good day! 1. I would like to ask how to fill the gaps in historical data. I have tried various methods. From the classic download via History Center of MT4, to downloading a certain software which downloads data from a certain broker, to getting an EA which supposedly downloads data for me. However,...
I have an EA written in MQL5 the EA depends on data from four indicators, sometimes it copies the data correctly most times I get an error 4116, as a result of this error trades that depend on the value of the indicator are closed because of the ridiculous values that are posted to the indicator...
Hello Everyone,  I tried to modify Stochastic,  to pop-up alert  only one time once indicator reach to over-brought or Over-Sold Level. But again getting same error,  //+------------------------------------------------------------------+//|...
Hey! I need to dynamically fill objects of complex types (class or struct) with data. The class/struct may look like this: class FooClass{   public:      int Int;      string Str;      double Dbl;      .      .      .};struct FooStruct{   int Int;   string Str;   double Dbl;   .   .   .}; The catch...
Hello, when i place a file into folder files i can open this file when running or debug my expert. But when i run the backtest, the file is not found. Ok, after some research, i found the property tester_file. When i add this to my code: #property  tester_file...
Both of them returns the computer time, isn't it? What is the difference between them?