I would like to close in a loss but unfortunately it does not close at all with the code below. for ( int Loop= PositionsTotal ()- 1 ;Loop>= 0 ;Loop--) { if (m_position.SelectByIndex(Loop)) if (m_position. Symbol ()== Symbol ()) { double ProfitPips= PositionGetDouble ( POSITION_VOLUME )*
Hi,
Anyone know how's that ? The stoploss in the order list appears in yellow. And on the graph it's more weird, likely it has been trailed but it didn't touch it. Any answers ?
HELLO expert writers im very new in programming mql and am confused about a big problem , i only just but only want to send the BROKER A ACCOUNT EQUITY VALUE (that is changing continusely in every tick ) for example 5665 USD to BROKER B Metatrader EA . so THE metatrader B EA shows that recieved
My MQL5 is closing my position right after having the position open, my code was working perfect and from now where it started to happened. I have even create a new file completely from the zego to execute only one Buy position and the problem persists. OBS: i ahve check and my stop loss and take
I am getting this error on the H ashi indicator: array out of range in 'heiken_ashi.mq5' on this line: double haOpen=(ExtOBuffer[i-1]+ExtCBuffer[i-1])/2; The whole code is shown below: How could this error be solved? //+------------------------------------------------------------------+ //|
Hello, I am making an EA that draws some levels, I need the levels to be drawn at the end of the FOR cycle, but the execution is not sequential, even if I place the instruction after the FOR cycle, it is executed before. Is there any way to do it? Thank you
Hello, I have a very simple question. I want to buy EURUSD and close by Takeprofit or Stoploss. My code open the position but never close. Could you help me a little? MqlTick last_tick; SymbolInfoTick("EURUSD",last_tick); Ask=last_tick.ask; Bid=last_tick.bid; MqlTradeRequest
int OnInit () { //--- if (!m_symbol.Name( Symbol ())) // sets symbol name return ( INIT_FAILED ); RefreshRates(); { //--- Initializing expert if (!ExtExpert.Init(m_symbol.Name(), Period (),Expert_EveryTick,m_magic)); //--- failed printf ( __FUNCTION__ + ": error
I run my real account on ICMarkets. I tried backtesting data from ICMarkets and dukascopy (imported from TDS). ICMarkets data is 100% quality since Jan 1st, 2022. Dukascopy data is good quality for 19 years. So, which data will you perfer
I buy EA MT5 for trading, I want to know Can the seller modify the order signal online? or that ea will only work according to the programmed instruction set
Hi all, I am coming to this forum to find some help to understand where the error on my EA can come from. I have developed the same EA for multiple currencies (+ XAUUSD), and I have backtested it a lot without encountering any issue. However, once I put my EA on a demo account with XAUUSD, I am
Hi I want to know where I can learn more about different settings for intraday timefilter in mql5 wizard. What should be my settings if I want to trade during 00.06 hrs to 22.00 hrs thanking you
from my observations tick size SymbolInfoDouble (symbol, SYMBOL_TRADE_TICK_SIZE ); is the same as Point() for a specific symbol,100% though I'm not sure why they are being called and defined as different things on the docs, but the point I'm trying to make is that using Point() to calculate
#include <Trade\Trade.mqh> #include <Trade\PositionInfo.mqh> #include <Trade\DealInfo.mqh> CTrade trade; CDealInfo deal; CPositionInfo info; enum types{ONLY_BUY,ONLY_SELL,BOTH}; input types Types = BOTH; input int RSIPeriod = 2 ; // RSI Period input ENUM_APPLIED_PRICE
I want to find the pip difference between open price and close price of last candle. How can I do that in mql5? Thank you in advance 💓
Hi. My EA is working fine with one account on my VPS, and when I try to run it on account number 2, it won't attach to chart. So I believe I have to sync it with the VPS, and here is where my problem start... My navigator window looks like this: I do not have the option to sync, as in this image: I
Hi everyone, Hoping someone can help me with this. When I call for the current Hour and Minute using the below code, it returns the correct information on live data but when using it in strategy tester it always returns 0. Any ideas? MqlDateTime dt_struct; datetime dtSer = TimeCurrent
My EA is working fine on any Currency pair that has a suffix Provided by my Broker, but if I switch accounts like to my main where EURGBP.r does not exsist I have to use EURGB but thats where my Problem starts, the EA is not working on this pair, or any pair that does not have a suffix, I dont know
Hello every one, I have a error in MQL5 and i would like to get the helpful. I make the code to save the global variable in MQL5 and it have an error #5040 by the function GetLastError(). In MQL4 i don't have any problem. This is the code: string GVar_Info; double Fibo_Signal; int OnInit () { //---
Waves everyone.... May i ask what is the fast way of learning that a Position in a specific Symbol has been Closed? Both Manually and with TP/SL. Will really appreciate it. Sincerely
[Deleted]
Hello
I am running a optimization for my EA that took a bunch of hours already. I used the Cloud network for it too. Since the update came out i cant use the cloud service anymore. i guess i need to restart mt5 to use it. my question is..... do I have to start my optimization from the beginning if...
Hi All, Can someone point me to the error in the array, please? Not sure why i keep getting the array out of range on line (163,12). Thank you. Regards, John //+------------------------------------------------------------------+ //| Entry_Template.mq5 |
Does anyone have some articles introduce about what I circle in the picture? I try to find it but I don't know what key word I need to type
I have tried to apply iHighest/iLowest in EA and it doesn't work at all. Any suggestion. Thanks
Hello, I've bumped into some snippets here and there for normalizing the lot size, and I've seen two different versions. I've searched the documentation, and it seems both are active, not obsolete, so I'm not sure if there's some sort of nuance in using one way or another. Can anyone clarify that
Hello there... When i want an order to be executed once per candle it just stops when I add " iTime () " function. And the problem seems to be only with " iHigh () " and " iLow () " functions... i will appreciate if anyone would kindly give me a hand, thanks
I am trying to convert a 'simple' EA from MT4 to MT5 to list History Orders - in particular I want PROFIT, Time OPEN & CLOSE etc I have tried and had partial success shown in the messagebox (using string variable MB) I use the following code void On_My_HistoryOrder() { /*datetime df =
double SLArray[]; void OnTick () { ArrayResize (SLArray, 100 , 0 ); for ( int i = PositionsTotal ()- 1 ; i>= 0 ; i--) { ulong Ticket = PositionGetTicket (i); if ( PositionSelectByTicket (Ticket)== true ) { SLArray[i] = PositionGetDouble ( POSITION_SL );
The dll file is regarded as virus isolation by windows antivirus software and cannot be successfully installed to the mt4 root file can someone help me
I really need your help, please. I'm still in the learning phase on MQL5 programming. I'm actually trying to write a simple program of what I've been learning so far. But there is one thing giving me headache. This code enters a sell trade at the close of a candle. It exit trade if it goes above the
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.