Expert Advisors and Automated Trading - page 72

I have a python script I want to implement on MT5. How do I do that
The documentation says: Only part of the request was completed I just want to generate an alert if ever it happens, but are we 100% sure what the return code means? Even though most of us probably never got that error code and can't test it in a demo or strategy tester, do we know if we would get
  Setting Trading Days  (11   1 2)
Hi all, I'd like to test my trading strategy on different days of the week. I've 'followed' the instructions here but I don't seem to understand how to use the functions it suggests. Below is my code; #include <Trade/Trade.mqh> CTrade trade; CPositionInfo myposition; input double cLot= 25 ; input
Hi i need help with some coding , i have code that creates horizontal lines on the chart , but i need trades to execute once those lines are touched (do not want to use pending orders) only 1 trade should be active at a time and there after the the code can loop. please assist if possible
Hi, I'm not Pro in coding I created a code to draw a rectange on the chart and filled with red colour I have 2 problems 1. The Object is listed in Object List but not appear on the Chart except when check it's properties and click OK. 2. Want "Time 2" to be a 2 weeks back shift. Here's the code if
Hi, On MT5 When calling an indicatorf from and EA using iCustom or iMA: is it possible to set the Parameter "Style" to set the color of those indicators? This is useful in the Strategy Tester Visualization, since creating the handles will draw the indicators too (very useful) BUT I could not see a
Hello guys, Someone can explain why it is that: long leverage1 = ACCOUNT_LEVERAGE ; returns value: 35 and long leverage2 = AccountInfoInteger ( ACCOUNT_LEVERAGE ); returns value: 300 Why these two do not return the same value
Hello everyone , I have encountered a problem and hope to receive everyone's help , thank you ! My question is very simple, just is to get the total positions My code : #include <Trade\Trade.mqh> CTrade m_trade; int OnInit () { return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason)
I developed my own EA, based on a simple martingale style. The order placement worked perfectly when I tested this with a demo account. When I started with a couple of real trading accounts, there was no issue to place an order. All orders directed by the EA were placed without any missing one
I have a robot in MQL5 that I use to trade assets on the Brazilian stock exchange. The robot works perfectly for opening buy and sell orders, but when testing it with BTCUSD, it fails on the sell orders. Looking at the logs in the Experts tab, it seems that the values are correct, and I don't
I have written an MQL4 Expert Advisor code: It should open a BUY position, if the EMA12 crosses above the EMA28, and then a SELL position, when the EMA12 crosses below the EMA28. It examines this condition at the close of every 1 minute candle. Only one BUY and one SELL should be traded, so I used a
Hey guys, Is this function for sending an asynchronous order useful for a strategy that does not use market orders? My EA only uses stop orders to open a position and limit orders to close (take profit), and my question is whether placing an asynchronous operation would have any advantage. I am
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 //+------------------------------------------------------------------+
Good day, I have been using a free EA in mt5 but today it was updated to a new version which is no longer free. Will the old version I have running still work or do i have to buy the new version? Thank you for the help
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
[Deleted]
How is it that the POSITION_COMMISSION property is not indicated in the documentation on the properties of positions, nor proposed in the code completion in MetaEditor? https://www.mql5.com/en/docs/constants/tradingconstants/positionproperties#enum_position_property_double However, we find the