Expert Advisors and Automated Trading - page 110

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 { };
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);
  back test on MT5 ?  (11   1 2)
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 ()
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
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
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
i want to read an external parameter from csv, use it on tester, and then after each test pass update those parameter and write it back to csv. i try to put the imported parameter as global variable, so does with file name string. i use slow complete algorithm and optimization target was input count
Hello MQL5 Community, I'm currently developing an Expert Advisor in MQL5 and I'm facing a challenge. I would like to incorporate the news events listed in the MetaTrader 5 Calendar tab into my EA. Specifically, I aim to prevent the EA from operating during the peak hours surrounding significant news
Hi everyone, I am trying to send a message from MT5 to Telegram using a bot. However, I could not send the message from MT5 to Telegram due to the error: Error Code 400 Description "Bad request: chat not found" Can you give some reasons why this error might have occurred? I did a lot of research
Version: 5.00 build 4070 — Issue: On the Strategy Tester window, the gui button (see Figure 1. below) freezes (sometimes they won't respond to mouse clicks, like the pause/resume button) while running test. Guess the UI thread of the window is too busy rendering the chart visualization ? plz fix
Hello everyone, I'm trying to get data from a custom indicator using the CopyBuffer() function. When I call the function giving it a buffer index greater than 4, I get only zeroes in my destination buffer despite the data being correct inside the indicator (I've double-checked with debugger and
Hi Guys, I'm probably missing something really basic but I can't find out to export the Profit column from the Strategy Tester report. I'd like to analyse the results from an EA. It's not my own EA so I can't export the data to csv. I can see the profit column if I right click on the on the results
Hi, This is my first time using forward testing option in MT5. In forward testing equity curved I found a drop on equity on the first time of forward testing period like image below. Is this how it works or there's something wrong with my forward testing
Hello MQL5 forum I have a problem with my code. Hope someone can help. When I run it through the debugger, I can see that the only line that gets executed in the for loop is the first line. The EA then ignores 'if(PositionGetSymbol(i) == SymbolOne){' and the rest of the first loop. It's a similar
SymbolInfoSessionTrade works only for the symbol of the current chart How can I get info about other symbols
I would like to make a EA of the arrow that appears on the arrow from the custom indicator. Please recommend a place where you can view the codes using the icustom function, instead of the manual.
Could I possibly ask for clarification about something. Suppose you were doing a backtest on a particular time interval and you were on the very first bar of that time interval, and then your code called a function trying to look at the previous bar. Does that mean that MT5 would get data from
Hello, I wrote a review about some EA I tought lack a feature... The author PM me and showed me that the feature is really included... I apologized to him, but when I wanted to edit my review, couldn't let me do it... How can I change my review about an EA that I purchased? Thanks in advance