Expert Advisors and Automated Trading - page 129

Hello developers I want to know if there's a way to change chart profiles by ID programmatically for MT5 i have the source for mt4 this is part of my mt4 code #include <WinUser32.mqh> #import "user32.dll" int GetAncestor( int , int ); #import main =GetAncestor(WindowHandle( Symbol (), Period ())
hello guys I'm using an EA shockbar 1.1 and i want to add a feature to it that make the EA set the lot size automatically based on the number of positions for example: the the first position will be 0.04 and the second will be 0.03 third will be 0.02 and all positions after that will be 0.01 until
Hi there community, I'm trying to get Symbol Profit values from the loop. Made this way: double TotalProfit= 0 ; int LongPos= 0 ,ShortPos= 0 ; double SProfit= 0 ,SLoss= 0 ; double Positive= 0 ,Negative= 0 ; for ( int i= 0 ;i< PositionsTotal ();i++){ ulong
Hello friends I need an EA modify and close all position There are illustrations, examples, and sketches SL and TP are edited directly in position Anyone who can do it can inbox or pm me thanks Example image link for EA and features
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
  Manual EA orders  (4)
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 <=
  Spread values of bars ?  (12   1 2)
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
  Demark Auto Trader  (29   1 2 3)
Demark Trend Auto Trader EA
[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