Expert Advisors and Automated Trading - page 128

Can someone please help me with the mq5 code to enable the times to be optimized ... needs to be 4 separate lines Start Hour ... HH Start Minute ... MM End Hour ... HH End Minute ... MM Thank You :)
Is there anyway to run metatester simulations with a fixed balance? right now I can only get it to, basically, tell me how much can my account grow with the current strategy, however, I don't know if using a fixed balance every month in the simulation can give me different results as in an specific
Hi all. I'm aware I can query the current account balance of course. I'm aware I can query historical data for bars, deals, and orders (for information at some point in the past). Is there any way to query what the account balance was at some point in the past. eg. if I need to know what the
Hello, There is anyway to check if a symbol is trading in normal or auction mode? I'm having problens with auctions in the middle of the day in the USD/BRL market at BMF&Bovespa (Brazil). When a auction starts the robot send thousands of orders. With the ENUM_SYMBOL_TRADE_MODE there are some...
Hi I am getting compilation error as below: ',' - unexpected token StrategyBase.mqh 51 16 'mSymbol' - some operator expected StrategyBase.mqh 51 9 expression has no effect StrategyBase.mqh 51 2 ',' - unexpected token StrategyBase.mqh 51 23 ',' - unexpected token StrategyBase.mqh 51 33 expression has
I have EA running which works fine most of the time but suddenly once in a while I get error 133 (Trade disabled) for Pending order it places. Once I get this error I am not able to delete or modify this order. But although in my MT$ it still remains Pending order but actual broker server it shows...
Any information about MT5 Auto Trading for Indian Market
Hi, im looking for drag & drop script to work with multiple entry in floating, example; 1 entry in profitable close all other same direction sell/buy entries once reached to targeted price line or targeted profit amount instantly. Targeted price line need to shown on chart. Targeted price OR
I have the following case: I want when a pending limit order is canceled or when it is executed the EA gives me the information of this order. I tried the following, but it didn't work: //+------------------------------------------------------------------+ //|
I want to add the magic number to the manual open position list, but what I wrote doesn't seem to work. See if there is a solution? int total = PositionsTotal (); for ( int i = total - 1 ; i >= 0 ; i--) { if ( PositionGetString ( POSITION_SYMBOL ) == _Symbol && PositionGetInteger (
Hi there, While trying to run a backtest that involves placing a pending sell order on the daily chart I get the strategy tester journal displays the message "failed sell stop.. [Market closed]" as below: The strategy tester settings are as below: The trade sessions times are below, but since the
Hello, I'm using some shortcut keys to perform some actions via keyboard.. the problem that when I configure a hotkey that MT5 also uses.. it works but also activates the function of MT5, for example the "SPACE" that activates a search box at the bottom of the chart.. my question is, how to "undo"
Hi, how would you approach the problem of displaying multiple equity curves from the optimisation results? Thanks
Hi there, I've followed these instructions on importing data: https://www.backtestmarket.com/en/blog/post/how-to-load-data-in-mt5. The MT5 user guide also has instructions on importing data but both resources related to 1M bars. I'm interested in daily bars for coffee for 10 years which I can get
i have a strategy that can switch between using market orders and stop orders/ pending order . When i switch to pending orders and try to optimize. The optimizer starts with an arbitrary balance max and never changes until all steps are completed any assistance will be highly appreciated. Can share
Hey guys, why doesnt this Print out the Symbols of open positions please? void print_symbols() { for ( int i= PositionsTotal ()- 1 ; i>= 0 ; i--) { string symbol = PositionGetString ( POSITION_SYMBOL ); Print (symbol); } }
I need to code 1 EA, copy one of my existing EAs working on VPS Copy order according to capital ratio <...>
Hi, how can I load optimization results programmatically into the tester for further testing of those results only for a different date period? Thanks
Hi, How do I receive an email notification when an expert advisor I have having unloads itself from the chart? Thanks, Zijian
Hello, I was wondering if there is a way to "play" with mt5 operating(buy/sell) on past days (historical data), being able to speed up/forwarding the time. Thanks in advance
I want to make a function that can automatically sort according to the high, low, open, and close values in the mqlrates structure, but when calling the function, I find that the member variable name cannot be directly used as a function parameter. void getdata::Get_struct_sort(Type_Name
This indicator has no buffers and I'm not really sure how to extract the data i need (the pivots). If anyone can point me in the right direction it would be greatly appreciated. edit:I'm modifying the code to add a buffer, seems like the logical way to proceed
Hi There,is there a Website/ or anything else which offers for free full and correct data for ***?( Expert Advisor testing )i think i did not need to mention why. Warm Regards C.B
I am able to get the profit of the first buy trade but when I open another buy it does not sum it. How can I calculate the profit for all open buy orders? Thanks in advance. if ( PositionSelect ( _Symbol )== true ) { double Profit_Sum= 0 ; for ( int i= PositionsTotal ()- 1 ; i>= 0
Goodnight, I'm creating a bot and I need to extract some information for analysis, so I'm trying to create a txt, or csv, or even bin file, whatever I can make it work to receive this information; everything seems to work fine, as stated in the documentation, however the generated file has
I'm trying to get open price from ticket number and I'm using CTrade library to open position. I can open the position with no problem, but I think I cannot select the openned position by the ticket I have. I have tried OrderSelect() function, but it return false with error code 4754 which mean...
Are commisions and slippages included in EA automatically? Thanks
Hello everyone, I want to backtest my code with the strategy tester but i want an external input that say sometimes it's "&&" sometimes it's "||", is it possible ? Example : External_Input_1 between 1 and 10 (in the strategy tester) External_Input_2 between 1 and 10 (in the strategy tester)
Hello, I would like to write a piece of code that allows me to open a position (buy or sell) at a certain time (for instance 11:58:45) every day. I would like to let it open the trade on it owns, for a DCA stratagy (buy at 11:58:45 every ady). DO you guys have a code already doing that ? I can't
Good Afternoon, I'm currently working on my first EA and working with pre existing code. Here is the question, is there a simple relatively clean way to have the EA check open orders, and ensure that if it would not open another order on the same currency? The only way I can think of would be lots