Expert Advisors and Automated Trading - page 151

[Deleted]
So technically i want to open a trade once a candlestick has closed above the Hline or aleast find a hline that is near the closed and open a trade base on if its above or below. How would i write this in code
  Read Rectangle  (4)
Hello, I have a problem. I wrote an indicator that draws different rectangles, on the chart, in green and in red. Now I want my EA to identify these (indicator already implemented) and know which price is eg at the bottom and bottom. Is there a similar program here that can be optimized, or does
Hi! Please see my issue below: 1. Ran a test using the optimizer. 2. Selected "Run Single Test" from the optimizer results . ... However the results are quite different than what the optimizer row shows. Why would that be? What's the point of using the optimizer if it's not working to find
Hello, I want to use 2 strategies in one EA. So, I'll make 2 magic numbers for example Buy (Magic 1) will have Close position (Magic 1) and Buy (Magic 2) will have close position (if Magic == Magic 2) and the same with Sell But how to use position orders to make it have Magic 1 or 2
Hello, I have the following code which is duplicating my orders, I create a Rule //+------------------------------------------------------------------+ //| Teste.mq5 | //| Felipe Sena | //|
Hi, I use function Bar() to find out how many bars are in history. When I run it for D1 timeframe I receive 437 bars when debugging on history data, but more than 6000 when debugging on real data. I have "Unlimited" number of bars in Tools -> options. Is there some settings for debugging on history
Hello, this is data exported to excel: This is code for retrieved data: int h = FileOpen ( "OrdersReport.csv" , FILE_CSV | FILE_READ , '~' ); if (h== 0 ) Comment ( "File " + "OrdersReport.csv" + " not found." ); // First pass loads data from file into arrays dt, val (i.e. date/time, and
Hello, I have searched in vain an EA which will close pending orders (limit buy and sell) once normal orders have reached take profit, any clue? Many thanks
Hi, please see subject. Optimizer seems to work fine without cloud network (slow of course, but fine) - but when enabling cloud network the PC gets reeaallly slow and not much happens, then eventually computer freezes completely. I managed to get the journal to load and it seems like the last
Hi guys am new here (to the forum & to coding) Am trying to code a strategy that executes positions based on candle data collected at the close of each candle, the problem I have is that the ontick function completely messes up the strategy because each time a new tick is released the strategy
Compliments of the year I need assistance, on MT4 it was possible to edit an EA, compile it on meter editor 4 and refresh it on the trading platform before testing it, but o MT5, the edited EA does refresh, example, if you had 0.1 lot initially and you edit the EA to 0.6 lot, compile it and start
Hello Team, I'm looking to find out about whether or not it possible to show Opened Trades/Closed Trades on a Custom Symbol . I have, for instance, coded a (rather ugly) means of extracting the Real Tradeable symbol from Custom Charts made with a Renko Utility: tradeSymbol = ( _Symbol ); string
Hi, I am trying to retrieve the calendar from the investing website to show on MT5. void test() { string cookie= NULL ,headers; char post[],result[]; int res; int timeout= 5000 ; string url= " https://sslecal2.investing.com/?columns=exc_currency,exc_importance&amp
Hi i got an indicator that has too many parameters for the iCustom function call in an EA. i got a "'iCustom' - wrong parameters count" error in MT5 how can i get around that problem ? i'd like to be able to change the indicator parameters inside the EA rather than recompiling the indicator with
Hello, I want to transfer data from demo to live account. This can be done with txt. I need small data for that, but problem is because I have tried to use read and write to specific folder but my code not works. How to do this? //--- open the file ResetLastError (); int file_handle= FileOpen (
Is it possible to set up the strategy tester to test an EA over several different time windows - e.g. run over Jan 2021, Feb 2021 etc, and store the results. I guess I could just run the EA over the whole period that data is available and manually wort out for each period how many trades it did
Hi! Please see subject. I have balance and enabled cloud network, but it's only using my local machine currently. Not sure if it's possible to engage the cloud network for this task, and if so, how? Thanks much! =)
Hi, Is there any way to block or avoid someone use more than one EA at the same account. I wish to use only my EA and avoid someone use a "copier trades" to another account (from demo to real for example)
I built a trading robot with the MetaTrader 5 api. Everything works great until the system crashes every few hours. It opens about 20 or 30 trades at a time on a currency pair in a candlestick, which often does not include SL or TP. In these cases, everything is wrong. The point of entry into
I've come across an issue that's a bit strange, the code below is able to tell anytime a pending order is deleted/cancelled on the chart. Outside tester the result.order field carries the ticket of the pending order that was cancelled, but if you run this same code on the strategy tester the
if both conditions are true in a logical OR statement, what will be the outcome? Eg - if (A=1) then C=1 if (B=1) then C=1 so, accordingly, if (A=1) || (B=0) then C should be 1 if (A=0) || (B=1) then C should be 1 if (A=1) || (B=1) then what will be the C? is it still C=1 when both conditions are
When demarker period 2 crosses above level 0.6 and mfi period 2 is below level 20,bot should take a buy Then bot should take profit when mfi period 2 is higher than level 35 Please help me code it please,anyone help me
Hi there! Sorry if this is the wrong place to post, i just didn't find a better one. i've found a discrepancy between the documentation and the real behaviour: For FrameAdd() , the documentation states: data [in] An array of any type to write into the frame. Passed by reference. But in
hi new mql5 developer here I have 2 errors can you help me? '{' - function definition unexpected 4MA.mq5 462 1 '{' - function definition unexpected 4MA.mq5 471 1 //+------------------------------------------------------------------+ //|
Hello guys, I couldnt find any example on codebase. I'm pretty sure there is something out there about this. A simple interface with two textboxes where you can define stop loss = 200 and take profit = 300 (for example) and when you enter an order at market price (both values, sl and tp go along
hello, I start programming in MQL5, and I progress little by little but I do not understand an event. I put the code below but when I run the Script and look at the log in MT5 it tells me that my stop loss is not good (stop loss = 700,000). At the beginning I thought to myself that I had coded badly
Hello everyone I use MT5 for trading but I need some help I want to have an expert for my stop lost that fix on kijun sen or tenkan sen value. can you help me to make it
Hi! I have been doing some research but so far can't find an actual yes or no answer to this. I'm looking to create an EA that will work with renko bricks and can autotrade. Thanks much
Hello, Just bought a month of the MQL5 VPS service. I read the instructions and set up my charts and system options as I want them to be before migration, including all my custom indicators. When I go to migrate, the migration says it's successful and all the message in the journal say this too -
trying to change the stoploss of an order, I get the error in question and "error n 4756" i'm using a library downloaded from this site, it's called k_orders, i've changed it a bit believing i'll solve the problem but i still get the error. the library is in the attachment. p.s. I'm trying to move