Can a function be accessible only to an include file
Good day I want a script to enlarge a chart to the maximum size That is: When Expert mode occurs on the chart, the chart is enlarged to its maximum size automatically Thank you all
New to mql language I'm getting: 'iclose' - cannot convert enum' error on this line of code: h = iHigh(_Symbol, _Period, iHighest(_Symbol, _Period, iClose(_Symbol, smoothTimeframe, 0), trendPeriod, 0));(Symbol(), PERIOD_M1, 0) any help appreciated
Hi all, When running a single simulation in the Strategy Tester with the "visual mode with the display of charts, indicators and trades" checked ON (Settings tab), I get a new separate window with the full simulation. That is what I want. However, I also get another (undesired) chart in the terminal
So I transferred my VPS to another brokerage account. Then I transferred it back to the original one I had it on. All of the sudden, migration keeps failing. I looked for answers here, and one of the suggestions was to try connecting to another server and restarting my terminal. So I did that. It
Hi together, I (think I) read alot about how to calculate profits and loss of open tickets/deals. In some MQL4/5 talks there so many different opinions and guesses. Im really confused now what is the way or the best way to calculate PnL for the open tickets/deals. The last thing I read that should
I'm getting the below 2 warnings when I compile my expert advisor. Can someone please point me in the right direction to get the 2 functions working implicit conversion from 'number' to 'string' TrendBotV2.mq5 68 27 implicit conversion from 'number' to 'string' TrendBotV2.mq5 116 25
Hi, I want to change code below to a template so that I can used it on enum data type, bool GetIniKey( string fileName, string section, string key, int &ReturnedValue) { string result=GetRawIniString(fileName,section,key); if ( StringLen (result)> 0 ) { ReturnedValue=( int )
I am building an EA and am experiencing some very odd behaviour in the MQL5 compiler, debugger and strategy tester. When I run my code in the debugger, or compile with No Optimisation, it works correctly and as expected. However, when I compile with optimisation enabled it runs very strangely and
hi, i've been working on an EA that has pending orders but it seems like i'm missing something, there are no errors or warnings and i don't know what is wrong; i have never worked with pending orders before and i think its a simple fix that i cant find; even though i looked at free open codes i
1) One of my input variables is SimTimeFrame (input ENUM_TIMEFRAMES SimTimeFrame ); 2) In the tab "Settings" I set the time frame to "M1", and set Modeling to "Every tick based on real ticks" 3) I run the optimization with "Custom max." 4) In the tab " Optimization Results " I select one of the
Using the const specifier I can protect an array of objects from being resized: class Foo { }; void resizeObjects( const Foo &arr[]) { ArrayResize (arr, 1 ); // 'arr' - constant variable cannot be passed as reference } Why doesn't this work for an array of pointers? class Foo { };
How to make ensure that not more than one trade is taken per pair when multiple pairs are traded
(1)
I'll be putting my EA on several pairs at the same time which is something I'm doing for the first time. Usually with one pair its quite easy to manage using a check for PositionsTotal () Now I want to make sure that not more than one trade is taken per pair when trading with multiple pairs. How can
Hello Everyone, I've encountered a strange issue with an indicator while developing my EA. When applying the custom indicator to the chart manually it works fine but when doing it programatically, the two plots of the indicator are inverted. I use several custom indicators in my EA attching them to
void CheckOrder() { BuyNum= 0 ; ArraySetAsSeries (BuyOPrice, true ); ArraySetAsSeries (buy_ticketnum, true ); if ( PositionsTotal ()> 0 ) { for ( int i= 0 ;i<=BuyNum;i++) { ulong takeOrder= PositionGetTicket (i); if ( PositionSelect ( Symbol ())== true ) { if ( PositionGetSymbol
Hi, A quick question on how to remove an array and revert it's size to 0. To do so I use ArrayRemove and the ArrayFree function. Is this correct? ArrayRemove (SymbolArray, 0 , WHOLE_ARRAY ); ArrayFree (SymbolArray);
Hi I want to work back test 99% accurately on MT5 platform. But I don't know if it's enough to do it directly on MT5 platform? Or should we use other programs like (Tickstory). I mean, Can we believe 99% accuracy results when doing back test directly on the platform or should we use other programs
Hi I create a line object OBJ_HLINE and then I create a label object OBJ_LABEL to put just below it, I can retrieve the line's y coordinates, but how do I display the label completely on the right because a line can't see x-coordinates? thank you in advance for your insights
In MQL4 for closing price you would use the function OrderClosePrice(), I want to use the same function in MQL5. Is this the correct function POSITION_PRICE_CURRENT
Hello Everyone, EA still working on my chart even due i deleted it already !! Can you give me an advice how to solve this issue? Thank you, Ner
Hi All, Was looking to get some help with a GetLotSize function please? The attached code correctly gives a dynamic lot size on every pair apart form USDJPY and I'm racking my brains to see what's wrong with it. I've included the helper function below I think the problem is in the moneyLotStep
Hi, I'm getting different behaviour in MT5 when I translate the following code: MT4: int recentLow = iLowest ( Symbol (), PERIOD_CURRENT , MODE_LOW , 5 , 0 ); double stopLossPrice = Low[recentLow]-( iATR ( Symbol (), PERIOD_CURRENT , 14 , 0 )/ 2 ); MT5: int recentLow = iLowest ( Symbol ()
Hi, how can Orders, Positions and Deals be linked together? Is there a way to link them apart from the magic number? Best Reguards, ZeroCafeine
Is there any command to stop running program without breakpoint
I have a peculiar case - my EA works fine for few hours, then it suddenly stops taking trades. It is more or less a scalping technique
I have found that after every optimization, my hard drive health status decreases by 1%. Later, I found out that a large amount of data was written to the hard drive during each optimization.Is this normal? What is writing to the hard drive? I know that functions such as Print() will not be executed
Non USD pair like EURGPB/AUDNZD take long time taken to complete a test/optimization why is that?
(4)
Anyone experience had similar experience? My optimization use Every tick based on real tick. Is it only my problem or is because of something else
Hello boys and girls. Im new to mt5 and i have currently my EA bot running backtestings. The problem is that i want to backtest whole year of data but my strategy work only on specific time in day ( market open ). The problem is that we have summer time and winter time where hours changes. So my
Hi, do anyone know what can be the cause of the strategy tester shutdown??? I was working on a code and i can no more test it. At the beginning i though the problem was with my code, and tried to test other ea., but same problem, nothing works. the strategy tester starts and stop alone
Why does the compiler ignore the definition of a method in a class in which it is declared as PURE?
(3)
This code compiles without any errors or warnings: class CBase { private : virtual void pureMethod() = 0 ; }; void CBase::pureMethod( void ) { Alert ( __FUNCTION__ ); } Is it normal for the compiler to ignore method definition? This is deliberately incorrect code that contradicts itself

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.