Hello, I am using the following function within my EA to only open trades at the start of a new bar if the entry criteria are met. //+------------------------------------------------------------------+ bool new_bar( ENUM_TIMEFRAMES timeframe) { //--- memorize the time of opening of the last bar in
Hi, I am interested in the possibility of giving trading orders(T/P and stop to existing order or new entry order, maybe OCO order possibility) with the use of EA where I would manually specify levels for the order to execute. Does such EA already exists already(a question for somebody that knows
Hi I'm trying to make my spread filter work again, as it was working perfectly before and now it isn't and for the life of me I can't figure out why. In my trading routine I check for low spreads : double maxSpread = 0.4 ; int spread = SymbolInfoInteger (pair, SYMBOL_SPREAD ); if (spread <=
hi, functions : CopySpread() and iSpread return the spread value of bars. What's definition of spread for BARs ?!!! (as compared to tick spread) Spread at any tick = Ask - Bid. Ask and Bid can change each tick, and bars are accumulations of ticks. so spread of bar is first spread of ticks of that...
Hello, according to the MQL5 documentation it should be possible to determine whether an account is under the netting or hedging mode the following way: AccountInfoString(ACCOUNT_MARGIN_MODE_RETAIL_NETTING); Unfortunately this only produces a compilation error — any ideas, please
Hi everyone. I'm using the StopsLevel() and FreezeLevel() methods of the CSymbolInfo class to help calculate the minimum stop-level for an open position. I'm getting 40pips returned in StopsLevel() for EURUSD so I'm subtracting 0.0004 from the ASK price before placing a BUY order. My problem is that
Hi, I would like to know is any EA can help to close + disable auto trading when reach certain amount $ / % in equity? On the internet I found a few but I don't know how it choose the starting equity balance to calculate. I hope to have option to choose using what time of Equity (E.g. everyday start
Hello, Any ideas why my EA gets slowly over time when backtesting ? CPU runs on 25% ram 280MB. I am Running the EA each minute. The variable are initialize before getting into the loop, there are approx 100 variables. int Check_Candles[ 3 ]; I have a loop that is executed three times, based on
hi everyone, i'm new to programming and i need your help. I needed an ea to start studying the nature of the financial instrument, so I established these rules: - every day marks the high and low of the current day - we will use smaller timeframes for the visualization but we will refer to the high
[Deleted]
I am relying on the new MQL5's function WebRequest in order to consume a RESTful webservice from an EA, however I can't POST some JSON data this way: string headers;char result[];string signal = "{\"ea_id\": 1,\"symbol\": \"AUDUSD\",\"operation\": \"BUY\",\"value\": 0.9281}";StringToCharArray(signal...
Hi, I'm curious what would be the best method of implementing these 2 platforms together? Binance has an API available here: https://www.binance.com/restapipub.html And Metatrader 5 is amazing because of it's cloud-enabled EA optimizations. Looking forward to a suggestion. Thank you.
So my current project has become quite, uh, webbed... In a bad way. I'm finding it problematic to define trade rules in a consistent and consolidated way, and if I step away for too long I find it hard to identify sometimes why a trade was opened or close, although my logging is pretty good. Is
hello, if my global variable is call abc1,abc2,abc3,abc4..... can i use like "for i=1 to 4" to calculate abc"i" ?? thank you for reply
Hi all, is there anybody out there who uses the standard libraries for MT5? I mean especially the financial libraries, libraries such as CExpert and so on. How reliable is this stuff, because the control classes are everything else than reliable and don´t work proper since they´ve been released....
My code is the following ... and I'm getting an error saying that "array out of range in '1.mq5' (23,13)" , when use it. How can I correct this error? Thanks a lot. #21/06/2020 2300 //+------------------------------------------------------------------+ //|
Hi! when evaluating the performance of my EA that's running on demo, i'm having trouble finding out which timeframe a pair was traded. I changed the TF a few weeks ago & unfortunately, didn't take a note of the exact day, as i thought (newbie...) it would be visible within /logs, MQL5/Logs or the
This trade was to help me in scalping. but it isn't closing trades. Objective was to find alternative for sl or tp at a level closer than stop levels of a pair. please help. Tried closing them by removing any condition for closing trades but it still didn't work. These set of statements to close
I have this input bool a= true ; input bool b= false ; If(a && b) #define result > else if (a) #define result < else if (b) #define result = else #define result != then I want to use result like this Print ( 5 result 3 ) Is it possible
Hi, I need a <Deleted> EA robot which can trade at pivot points support and resistance levels
Hello, When I make a get_position I have the list of my positions opened, and I have a colum with the "type". Type 0 is a Buy position and Type 1 is a sell position. positions=mt5.positions_get(symbol= "GOLDmicro" ) if positions==None: print( "Aucune position sur GOLD, code d'erreur={}"
Hi everyone, I'm trying to detect an order opened by my EA and closed manually. I tried with magic number but, unfortunately, get only 0 for manually closed orders. Anyone know how to reliable detect an order opened by an EA and closed manually ? Thank you
Hi I’m new to this platform and trading. So bear the newish question. I noticed in MT5 the MACD signal line is based on SMA. How do I go about calculating the MACD Signal line value based on EMA. I just am after the current value. I’ve read other posts about this but I am still confused. Some people
I am writing some files for state persistence, but this is not needed when back testing. What code or environment variable (or similar) can we use in the EA, so it knows when it's being executed by a backtest
Why as I getting this error? Is it because: #property indicator_buffers 6 #property indicator_plots 2 But I have: #property indicator_type1 DRAW_COLOR_CANDLES and #property indicator_color1 clrRed , clrGreen So I am using: Plot 1 4 buffers for the candles 1 buffer for the colour index Plot 2 1
I am trying to have a candle plot along with a line chart. The properties I have set us is: #property indicator_chart_window #property indicator_buffers 6 #property indicator_plots 2 #property indicator_label1 "candle" #property indicator_type1 DRAW_COLOR_CANDLES #property indicator_style1
Hello there, I did a very simple expert based on my personal trading strategy . Basically, I wait the indicators confluence and open a position following the trend, as you can see below. There are four EMA (8,20,50 and 200), Vwap, ADX(14), RSI(14) and Volumes. When all of them shows me what market
Hi all, I'm writing a CSV filewrite feature in my EA to basically track my equity curve as well as other data. This code works but everything is printed in one cell, rather than a different column for each parameter - any ideas? if (new_bar( PERIOD_M5 )) { string csv_name = "Infinity
Hellow, I hope somebody can help me :) I am storing a counter value in a variable. Each tick the value gets checked. For each time the value of the variable changes I want to perform a function. For example : variable = 0 variable changes to 1 > call to perform the function (one time) variable
In my EA I need to know how much money will I spend if I buy 1lot of current symbol. -- Pawel
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.