Expert Advisors and Automated Trading - page 144

HELLO, Am new to MetaTrader; How should I modify the " Moving Average Expert Advisor" so as to (1) Signal (buy/sell) INTRA-BAR other that at close (2) Signal only ONCE PER BAR (3) BUY ONLY and/ or SELL ONLY but not both Thanks //+------------------------------------------------------------------+
I just find this issue. And I double check and confirm this issue only occur on 3757. I am running several mt5 instances on same vps. EA on 3661 works fine, but on 3757, EA can't access url. I am sure my web request setting on terminal is right. I closed 3757, then I copy main exe file of 3661 to
I am trying to compute lot size having stop loss (as price) but the lot size ends up quite big and eventually, I get an error: Error code: 10014 Error message: Invalid volume My current code is: import MetaTrader5 as mt5 def calculate_lot_size(symbol, stop_loss_price): # Connect to the
Good day everyone I please need someones advise on the following. I have the attached EA that I have made. Everything is working fine but there are one problem that I cant seem to resolve and I have really tried my best. I have a maxTrade function so that when my "sellcondition" is met the EA needs
Hi, I have two trade filter of boolean input variable that I will use in my entry strategy. If the first one is true than use trade filter A and the entry strategy, the code is like this, void tradeSignal(){ If(InpUseFilterA) If(Filter A && entry long strategy) return OPEN_LONG;
Hello there! I'm converting my expert advisor to Metatrader 5. With hedging, the handling and calculation of positions is quite reasonable. I might need to stay away from netting accounts. But how do you handle positions with netting accounts? Example 1: You buy 0.1 lots of GBPUSD at 9 am and
If I create an EA* and use SymbolIsSynchronized() on EURUSD for example: int OnInit() { bool result = SymbolIsSynchronized("EURUSD"); printf("sync status: %u", result); return(INIT_SUCCEEDED);}; The terminal prints the following: EURUSD,H1: sync status: 0 No matter what I do (change...
Hi everybody, in my EA I use a lot of indicators. But by default, all used indicators automatically appear on the screen. Is this possible to switch them off and especially only some of them
Hey everyone, If using a demo or the strategy tester , orders are always filled at the exact order price. So if your broker rounds all its tick prices to the nearest 1$ while allowing you to place orders with a tick size precision of 0.01$, then this means you'll get very misleading results in demo
Hello is there any EAs that can help to average out of a losing position, ideally free or low cost
Hi anyone help me on this , i'm trying to develop a EA using python language and i need to calculate the lot sizes to fix my risk reward ration . attaching a images , in this image you can see 3 different brokers and when we trade 0.01 lot thee of them are giving different profits . i need to
Hello, I have a question about my Signal. I cannot actually put a link to the signal because the mediators will delete it. But I am getting messages I do not understand. My signal is dong very well and is performing as designed. But, there are many messages on the left column that indicate low
Hi, I want to send to meta trader orders automatically from an external API. For example we receive semnals from a API and we want to place orders automatically in metatrader4/5. Is there a way to do this? We think to code an personal application using c# ( console application) and connect to meta
Hi I've tried to download that data with this: but only get to download the last 10 thousan candles. How can I download the last 10 years? or from where? need arround 7 M of data
I've recently figured out that you cannot use optimization with an ea that uses graphical objects on the charts such as trendlines, i was wondering if it's possible to put the trendlines into an indicator thats then called from the ea, will that work for optimization
Hi all, I need an EA for MT5 that close all position instantly when reaching certain % of profit, not close one by one. Right now i am using "Close by Equity Percent" free EA in the codebase. I set it to close at 20% profit level / 120% equity. But it only close the position one by one which
Hi all, I have tried to make an EA that draw a rectangle every 4 bars (can be x bars) and calculate the range of the 4 bars, but It seems to miss with the high or low of the first bar. Any clue how to fix it? input string Start_Time; input int Risk_Size; void OnTick () { int x; static int
Hi I have tried to download a free ea for mt5, but when i go to down load it askes if i have mt5 whch i have i click on and nothing happens? any help or advise please
hello Im a liitle bit confused about this. I donkt know how to explain it. Im trying to get information about Symbol. here is my script. void OnStart () { int expirationMode = SymbolInfoInteger ( _Symbol , SYMBOL_EXPIRATION_MODE ); Print ( "expirationMode is: " + ( string )expirationMode ); }
Is there a tester that could test multiple EA on 1 currency? Although mt5 could do this with multiple different pairs but could we test same pairs but with different ea and settings
I think I am having issues with magic numbers and reading them. I need multiple EAs are running on the same symbol(s) and therefore need to distinguish between open positions based on Magic number. The code I've used is failing and I've copied similar solutions found on this forum and it's still not
Hello. I am backtesting an EA with an account where the commissions are $3.5/lot/side. These are the trading settings for the commissions: Forex\*, Instant by deal volume, in/out deals, 0.01, 100000, 2.75, 0.01, 0, deposit ccy, per volume However, the commission does not appear in the commissions
Can someone tell me why BarsCalculated gives me -1 in the following code when testing in the tester. It appears to work correctly on a live chart but not when in tester. Data goes back to 2007 and I'm testing from 2017 so there should be plenty of data for the calculation. Any ideas
Hi Guys, Is it possible to place orders via your EA using a demo account ? When I try to place orders I get this error: sell: Order has not been completed -error 4752 ERR_TRADE_DISABLED 4752 - Trading by Expert Advisors prohibited I have 1000 equity in my demo account. Maybe my broker doesn't give
I know it is possible to generate Libraries from the code and then load it as ex5, similar to a dll. For example: #import ".... .ex5" ... #import However, this way you can only introduce functions, but not classes. It is not very convenient, is there another way please
Hi, I have an Expert Advisor which retrieves, with iCustom() , values from two buffers calculated by an Indicator: one buffer is associated with data get from the current Symbol() , while the other one uses iCustom() to get data from a different SYMBOL. The indicator prints correctly the two
Good evening, I have a problem, I have a script on mt5 that works very well (a simple Buystop and Sellstop), I would like to write an EA (A trailing stop) that will follow the position once triggered. I have already tried but the EA never triggers. Your help will be very useful, Thank you
I find a common-sense error, in MT5 tester. when I test a EA from market, I found its profit caculation is very wrong. It just a common-sense error. I am testing a EA with modeling "every tick based on real tick". I check journey of tester generated. tester developer of MT5 misunderstand buy and
  not enough money  (7)
Dear All, ACCOUNT BALANCE:10000. 00 USD Tried to place an oder through EA. CTrade::OrderSend: instant buy 10.00 EURUSD at 1.27443 tp: 1.28443 [not enough money] Got an error:not enough money why? please advise.
Hello, I am developing an EA but when I run a backtest , I can see a big different result between Meta Trader 5 and my broker (it got its own software). Both of them have a 99-100% history quality and the modeling is "Every tick based on real ticks". Who can I trust regarding my backtests? How can I