Hello all! My code works untill there is a loosing position then it does not work any more. Can please you help? #include <Trade/Trade.mqh> CTrade trade; bool isTradeAllowed = true ; double Lots = 0.2 ; double LotFactor = 1.5 ; int aMagic = 100 ; int OnInit () {
unsure if i have posted this in right forum section, but here goes... I bought an ea over 18 months ago (on marketplace), and made final payment early last year. But the author keeps updating the ea, sometimes 3 times a week, and I get notifications for each update! How do I unsubscribe from these
Happy new year to all, is someone able to help check what's wrong with this code? string symbol1="XAUUSD"; string symbol2="EURUSD"; class CIsNewBar { private : string m_symbol; ENUM_TIMEFRAMES m_tf; datetime m_lastBarOpenedAt; datetime m_time[ 1 ]; public : CIsNewBar( string
I am trying to get the ea to enter on candle open if previous trade on a symbol was a loss but my code doesn't if another symbol closes with tp. for example: 2 positions opened, 1 boom 1000 Index and the other Crash 1000. C rash 1000 hits Stop loss and then Boom 1000 hits take profit before
Dear all I made robot and complied it successfully. I used "Trade" function for entry command but it not entry my buy command event all condition ok. Is there any body same my situation. Please give me suggestions. Thanks all
[Deleted]
Hi, Summary: I'm testing an EA in Strategy Tester (ST) that uses a custom DLL. If I stop the test before the test ends (either from Strategy Tester or MT5), I'm unable to start the test again unless I close the ST window first -- ie. clicking the "start" button in MT5's ST toolbar while the ST
Hi, I am wondering if it is possible to create an automated trading system based on x-ticks chart? and happy new year
hello, my EA cannot open position mean while it must open buy position when AC indicator have a negative number . whats its wrong, please
Terminal : mt5 Spread: 1 when one of my positions hits tp, at the same price I want to open new position, but ea can not open new position (tp hits correctly). Example : I opened 1 buy at 1.13000 with tp 1.13040 and sell at 1.12999 with tp 1.12959; when price at 1.13040 exactly at the same time two
Hi! I want to limit my exposure/risk and make sure that my EA has no more than say 4 open trades at a time, i.e. across all symbols. Is this possible, and if so, is there a way to do it using built-in settings only, or does the EA's code need to somehow govern this? I'm not sure how that would
To get the current TP of an open position (hedging mode), I use if ( PositionSelectByTicket (positionId)) { return PositionGetDouble ( POSITION_TP ); } Once the position is closed, I search for the corresponding ENTRY_IN deal, and query the corresponding order for the TP: if (
Hi I noticed that in MT5, the way backtest are conducted in "Open Price" backtests is now different : all the processing will be handled at the CLOSE of the bar rather than at the open as before. I find this unsettleling as there is no way to do this in real life, because we never know when the last
hi, i'm making an expert advisor based on heiken ashi candle signals. As an indicator I am using "Heiken_Ashi.mq5", found here in the code base section, you will find it attached. While I am writing the ea. The ea, for now, should go to buy or close sell positions when the last finished candle is
Can anyone help me in coding a EA for meta trader 5 Its simple cross over but i need help in coding ***
Hi all, I am developing an EA. I want to get the current price , please tell me how to get it. I have read that Bid is the current market price, is that true, Thanks
HI I'm new in MQL5 programming I start writing EA based on Ichimoku indicator signal but the output of the EA for Ichimoku parameter is far different from indicator values on chart my code just for test is as below //+------------------------------------------------------------------+ //|
Hi, I tried setting up an EA and I got "Optimization cannot be started" or " no optimized parameter selected, please check input(s) to be optimized and set start, step and stop values" and that's on the Example EAs. How do I fix this
Dear Sirs, Again, your help requested. I developed an EA. The EA has entry via TRADE DEAL and even exit via TRADE DEAL. That is no take profit or Stoploss. While executing the trade, there were entry and exit orders, but no profit / loss was recorded/ Same happened when I closed open position using
It seems that position volume and PositionsTotal are switched or something. Running this code, which just buys twice then sells once leaves POSITION_VOLUME at 1 after the first order is filled. However PositionsTotal() increases after each order (including the final sell order) to 3. I'm a newbie
Hi, Is there any script to check if MA bellow 200? Thanks. Regards
hello I have automated a strategy with *** this one presents impressive backtests but I cannot add a trailling stop. the strategy is very simple and it just buys. to trigger a purchase the last two green candles must: open = at the lowest. it would be great if we could code it in mql5 or mql4
Is there any tutorial around for an EA where I just literally I can inset my indicators code for Open trade, TP, SL, I have tried some EA builder on line, but Im still far to understand all the coding argot, so I was guessing something like this can exist. Thank you in advance
Hi, I built this bot but when i try out this bot on the strategy tester, didint work out at all, like its didnt give any signals for the oppurtinty ''Buy'' Can somebody help me to find the error? Thank you
I am unable to access for download an EA that I purchased through MQL5 in the terminal portal. When logged into the web browser the EA shows as purchased, but it is not showing up as purchased in the terminal. Any assistance would be greatly appreciated in finding out how to make the EA show up so I
Help im new to this I want to try to code any videos or guide to help me to try this new ea thing
Hey guys, I have recently signed up for Oanda MT4 and have downloaded their excel RTD, but need the Excel RTD sample file. Where can I find it? thanks
I would like MT to start EAs from previous session automatically. How can I achieve this?? When I start MT5, I usually pass account details as startup arguments. However, both accounts use different EAs. Scenario: I start MT-Account 1, then MT-Account 2, then close MT1 and start MT1. MT1 tries to
Hi, this code compiled well on both MQL4 and 5. But in mt5 the button will not pressed at all. What should I do to make button work on MT5? #include <Controls/Dialog.mqh> #include <Controls/Button.mqh> CAppDialog pannel; CButton btn; int OnInit () { pannel.Create( 0 , "panel" , 0 , 10 , 10 , 300
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.