Expert Advisors and Automated Trading - page 58

To post a new topic, please log in or register
if(TimeFrame==PERIOD_M1){        Hcopied = CopyHigh(_Symbol, PERIOD_M1, 0, 5, M1_Bars_High);        Lcopied = CopyLow(_Symbol, PERIOD_M1, 0, 5, M1_Bars_Low);        Ocopied = CopyOpen(_Symbol, PERIOD_M1, 0, 5, M1_Bars_Open);        Ccopied = CopyClose(_Symbol, PERIOD_M1, 0, 5,...
Greetings, I wonder if it is possible to write a script which will backtest an EA multiple times, but each time using a different set of moving averages in order to determine the most profitable combination? An example would be to have 2 MAs, a short one and a long one. The short one could be 3, 5,...
Hello, Which Expert Advisor framework for MQL5 do you recommend? Thank you, Pierre8r
Hi to all, I'm studying EA building for some months and since the last week I've my EA running in a Live account. My EA close positions based on trailing stop (Trailing start at 2.5 pips of profit, 1.0 pips of step) In strategy tester all is OK but now in a live environment I see that sometimes my...
Can anyone suggest a good MT4 or MT5 free one click type tool? That let's you set a TP? thanks
I have CTRL+C the example from https://docs.mql4.com/common/cryptencode and just changed encode to CRYPT_HASH_SHA256 but the EA returns hash: 2018.06.06 11:33:23.602 !BINA_TC_000_test AUDCAD,H1: Encoded data: size=32 26B54A596255364BF3B1D9B4DF2FD33D61974D1F000DF23B6F7DE4313A6C72E5 according to this...
Hi all! Thank you for looking at this thread. I'm having an issue at the moment of trying to import a matrix from a CSV file into a MetaEditor script.  The file below is what the CSV file looks like in MetaEditor. What piece of code could I write to efficiently import these numbers into an array...
#property copyright "Adam"#property link      "https://mql5.com"#property version   "1.00"int bbHandle;void OnInit(){   bbHandle = iBands(Symbol(),PERIOD_CURRENT,20,2,0,PRICE_CLOSE);   }void OnTick(){   double upbb[];   double lwbb[];   double mibb[];      ArraySetAsSeries(upbb,true);...
In an EA I need to search a predefined list of currency pairs for a specific pair and return the corresponding value. The pair to be searched for is declared as an input at the start of the script. In the example below, how would I search for "EURCAD" and have it return the value 3.0? extern string...
Hello, I cannot find best way to close all buy/sell trade by group (string comment or magic). I use this code to open trades...someone could suggest the solution please? Many thanks! //+==================================================================================================+//| FILTER...
If the EA  trade all 28 pair need to put the filter "at a time it can trade max 2 pairs". How to make the EA to filter Maximum allowed pair to trade based on Equity draw down. Is there any tips on this
Hi all. I am getting crazy with this issue. I have a MT5 EA using the native MT5 Heiken Ashi indicator. It just displays the values of open, high, low, close of the current Heiken Ashi candle. When applying the EA to a graph which has the indicator applied, values printed by the EA do match the one...
Hello, I am new to MQL5 and I was trying to determine from an open trade how it was placed.  Below is a screen shot of what I am looking for.  I cannot locate in any of the ENUMs for a trade or position. Any help would be greatly appreciated.
Hi, I'm new to the editor, and I wanted to create a EA.  I've seen how to build an EA but I didn't want the EA to open and close positions for me, I only wanted it to highlight a potential setup based on my strategy so I do not have to spend all day at the screens, is this possible? I prefer to take...
Hello, I'm trying to create my first EA ... but I crashed during the tests! Apparently, I'm create the "Order"... but they are not initialized! They appear on the chart, but do not close, do not profit or hurt. I attached a printscreen, log and my code. Can you help me? Log: 00:00:00...
hello please i need to advise I want to use the basic moving average which is in MT4 on a test log with 0.1 Lot great results, but I can not run it on a real account with Lot 0.01. Can you help me how to run it? Thank you
hello, I'd like to run many test with different parameters and/or on different pairs automatically. for example I'd like to test my EA on EURUSD2012 and CADCHF2011 wihtout having to manually restart backtest at the end of the first run, in this way I could let my laptop work overnight and collect...
I am building an indicator that I want to be full-screen. The underlying price-bars do not matter because this is multi-currency. I am able to size the window dynamically using the following code, and it works, but it feels "ugly" to me. int OnInit(){        const int MAIN_WINDOW = 0;        const...
Hi, ‌ I‌ would like to get as much information on copy trading on MQL5. I have an EA which I would like to share with my group and want them to copy trade. ‌ I‌s copy trading available for mql5? if it is available how do I go about this? A‌lso I see that there is a "SIGNALS" tabs, what is the use of...
Recently subscribed to a signal that I like but having problems with the correct number of lots being traded. On signal history it starts out with .10 with a $5000.00 Deposit and after the first 11 profitable trades of $10.00 each it jumps to .30 lot. My account has $10000.00 in it and traded the...
Dear Trader...  I m now trading 2 years cdf etc and trying to build up an ea on mt4. As its not that simple im making progress... I have a question about backtest and your experience! I heard that mt4 backtests, usually are not very reliable cause of tick data spread and slippage and everything more...
My question is that. How, if it's possible, to use python code with MQL5, for algorithimic trading? Becouse I want to use some Python librarys to make a robot. If it is possible, is there any article about it? But if you just point me the way it would be vry helpful. thx.
It's been a while, but I'm back trading again.  There is something that I need to get done before I can start.  I need to calculate indicator values for every symbol that is loaded.  My code currently looks as follows to calculate the ATR< however the ATR CopyBuffer returns -1.  Any idea what I'm...
Who can help me? I want to make an EA, but i cant code, please hepl me I have an indicator and my stratergy is very simple.  If two lines are red, set one oder Sell, TP = SL =60pips  If two lines are green, set one oder Buy, TP = SL =60pips If one is red, one is green, Close all and wait untill they...
Good Afternoon, Anyone knows why I cannot use the structure below @OnInit() since it works perfectly on OnTick() ? The idea is to check handle management BEFORE receiving the 1st tick and realise it will not work due to lack of history. if(CopyBuffer(i_handle,0,0,6,i_buffer)!=6)&nbsp;&nbsp; {...
Why doesn't my EA work well? Although I have followed every instruction from my downloaded EA, it's still bad in backtesting result. In its website shows good backtesting result and it can give big profit from small deposit.
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)....