Expert Advisors and Automated Trading - page 78

I rather quickly stumbled across a misconception that I have ignored for a while now, it is finally time to address it. My EA currently fires in a bunch of orders to scale in and out of trades, the problem is: I thought if I have i.e. 3 BUY orders open and I want to close one, I could simply place a
  expert stoploss  (2)
I want to write an expert that, when I set a specific price, whenever the market price reaches it, my positions will be closed (exactly similar to stop loss, with the difference that in stop loss, the set price is recorded in my broker, But in the expert, I want only this price to be determined in
  Martingale ea  (4)
Please I need to edit this ea by the following features Take profit points double the stoploss, start and close time to be added, option to choose the first trade to be manual or auto Also I have a problem when I manually close a trade the ae automatically open a doubled reverse trade
  What causes error on my EA?  (11   1 2)
Hi i programming EA and it is work correctly in demo account, But when i want run it on real account i get the error 10004 and 10021. I read this link "https://www.mql5.com/en/docs/constants/errorswarnings/enum_trade_return_codes" But the definition of some error is not clear and i do not understand
Hi all, I'm relatively new to coding, but can someone take a look at this code and tell my if there's a reason the trades aren't triggering in back testing? I'm getting no errors back from MetaEditor, and the defined variables are how I'd like them. Just not getting any trades lighting up in MT5
  VPS Error  (2)
Hello, I am using a MQL5 VPS and I keep getting this error message in my journal: 2023.04.26 16:42:04.960 Virtual Hosting 6461921: invalid zip archive of logs 2023.04.26 16:42:04.960 Virtual Hosting 6461921: invalid zip archive of logs (raw - read failed, 0 error, 1 bytes needed) I have cleared the
Hello, After some research, I was unable to find the solution to my problem. I explain, if someone has the solution, I'm interested :) On the SuperTrend indicator, ( see screen ), that I use for an EA, and I would just like to be able to keep the last 30 data of the supertrend (the red or green
Hello Guys ,, i ve tried to compile mq5 file and there was No compilation errors or warnings . The ea exist with the mq5 file in the same directory : Advisers ,, but when i try to test it , it does not start, i ve checked in the Journal and it said : EA NOT FOUND ! Need Help with this issue please
Dear experts, I have question on OnTick() event . Let's say OnTick() is triggered at every 1ms but the actions you perform inside OnTick() itself takes 5ms which is more than 1ms. What happens in such cases ? Do actions accumulate or happen in parallel or next action skipped as previous one is
i have this : float max_distance= MathSqrt (( float ) MathPow ((( float )px_per_side+ 1 ), 2.0 )* 2.0 ); and it raises this error : but it accepts it like this : float max_distance= 0.0 ; //float max_distance=MathSqrt((float)MathPow(((float)px_per_side+1),2.0)*2.0); double _mdd= MathSqrt ( MathPow
I have been trying to work with error 4806 and I am a newbie I hope someone can help me to fix it I declared the double indicator and in the compile they give absolutely no errors until I check the field value int OnInit () { MA_SET MA_1 = { 34 }; MA_SET MA_2 = { 89 }; MA_SET MA_3 = {
Hello world So I am using the iCustom function with an Heiken Ashi indicator I got on the market. I keep getting the error for incorrect input parameters [4002]. input group "Heiken Indicator inputs" input int heikenPeriod = 10 ; input ENUM_MA_METHOD MaMethod = MODE_EMA ; input color uptrendColor =
Hello, I have an EA that uses OrderSendAsync() to send multiple orders in batches and I collect the order ticket #s with code similar to the below code. When the EA only sends 1 order, it's always perfect, but if the EA sends 2 or 3 orders, about 9 times out of 10 everything is normal and I get one
Is it possible to substitute the data used by my MT5 tester to a particular csv file containing the bars data of my choice
Hi Team Metatrader5 have integrated python, I can see trade functions can be used. Is it possible to test strategy tester from python
I prefer to declare variables, structures and classes that I use in OnTick() globally (one time), rather than locally within OnTick(). I feel that it is more efficient and less time consuming considering that OnTick() is called so frequently. Yet I see that it is common practice to declare locally
  EA  (2)
I had tired to creating my first EA but i am getting the output even I am not getting the Comment and Alert so what is the solution
[Deleted]
Update NOTE: this thread I have SOLVED out by using a for..loop and if..loop to filter out NON Zero Values and got the Index of Bar(s) with price data. Need guidance how I can use Structured Array for index and price data, and create a new thread for it. Dear Members I have a double SwingHigh[] with
Team, Please, can I have two EAs attached to the same Pair EURUSD belonging to the same account
hello, i got trouble with realize position that already partial closed and EA again and again close partially after price reach a level. So that i would like to set comment to position that already partial closed, could somebody help me in coding this. Thanks
I'm learning about mql5 programming and I'm trying to make a function that identifies minimum and maximum prices and adds Fibonacci. I managed to insert fibonacci in the chart but I don't know how to customize the values after 100 and before 0 (yes, I want to put negative values!). I tried several
Something strange happening. I'm attaching my EA to the main chart but it throwing error saying cannot load custom indicator 4802 It runs perfectly on strategy tester with no issues I've searched the forum but can't find a similar problem. Below is the attachment of the EA and indicator TDI auto is
Hi to all, I have a few questions to ask help because i didn't find clear answer in forum... I am trying to finish my EA in MT5 unsing some indicators , specifically :iMA, iATR, iMACD also I set the timeframe to H4 for the pair XAUUSD and for indicators. 1 ) FIRST the logic is that when I receive
Please i need help with logic. I created an ea to buy sell but I'm finding it hard to get the logic right. my problem is when I use all conditions inside of if statement it doesn't work properly on chart To validate buy; Green line <= 32, Green line must go below red line , Green line below blue
Some experts please tell what is wrong with the below code, it is not counting the open orders? int Nropen( int option){ int nrop= 0 ; for ( int ord= HistoryOrdersTotal ()- 1 ; ord>= 0 ; ord--){ ulong ticket= OrderGetTicket (ord); if ( OrderSelect (ticket)){ if (
Hi guys, Can you help me with my code, i need to close all current position when there is a new signal. Example: i'm currently on a Sell position, when there's a buy signal, i want the sell signal to close at market price and open a new buy position. Thank you! My code
hello everyone, i'm trying to write EA that decrease the current sell limit price every minute by one tick volume. but i get errors always can anyone help. the errors are: 'slippage' - undeclared identifier bbbb.mq5 33 12 return value of 'OrderSend' should be checked bbbb.mq5
I tried placing my intended function at the beginning of OnTradeTransaction, but my intended function is being executed after the trade request has already been executed
Hi  with the below function ,i can find if a symbl synchronized and updated or not.. is there there any way to synchronized a Symbol if its not synchronized?  SymbolIsSynchronized for example on my market watch i have 400 symbols, and till now i only used 5 of them ... so because regularly i use...
I have an EA, that I do not have the code for. It pops up a box with a yes or no question. Is there a way I can automate the clicking of the yes or no button