Expert Advisors and Automated Trading - page 214

Pressing the f7 key turns turn airplane mode and does not compile the ex5 file thanks in advance for any help
Hello, I'm modifying a position once profit reaches a certain level and taking 2 lots of volume out of 4 lots and letting the trade ride. However I'm getting some odd behavior that it will close my second position as well a short time later. Anyone got any ideas
I am running a long-only strategy that opens multiple long trades, and then sells them off one by one. The first position it sells should correspond with the ticket of the first position it had opened. I have been browsing the forums for literally hours on end, as well as documentation, but have
I'm having a problem back testing my EA which opens 2 (or more) pending buy limit orders for the same symbol in a netting account. The deals associated with the 2 orders have different DEAL_TICKET and DEAL_ORDER values, but the same DEAL_POSITION_ID value. As a result, when a Take Profit (or Stop
Does anyone know where I can get a 3 HMA Crossover EA that sends long trade when: -1st Fast HMA crosses up the 2nd slower HMA - 2nd HMA crosses up 3rd slowest HMA -Enter Buy trade on the first Bull candle that closes above the 2nd slower HMA Any help is greatly appreciated
Hi everyone, I found a script for MT5 which automatically and immediately adds a predefined stoploss to active positions. Is there a way modify it, so also non-triggered stop and limit orders receive a SL? It's mainly a safety issue for me, because I trade on the 1m and I am worried my internet
Hello, I am looking for an EA that can trade Volatility 75 index from the broker Deriv. I have not found any, but was wondering if anyone knew of any that have been tested and proven to be profitable? Thank you, C
Hi all, I am just wondering if it is possible to modify a trade I opened manually using an EA that I wrote after the trade by using orderID or something of the like. For example, long trade is opened manually at 8pm and I would love to insert EA conditions that will guide when to take profit on this
I am searching for a way to Fill an Array with some values in brackets so I don't have to mess around with indices for doing that like string array[1]="name1"; string array[2]="name2"; string array[3]="name3"; and so on... I got the idea in a python tutorial and now I have a similar problem in MQL5
Hello everyone, I have a simple problem with Buy-Limit order I want just one order to put but while backtesting I see unlimited orders put every tick and these are my codes if ( BuyLimit () < 1 ) if ( Buys () < 1 ) { trade.SetExpertMagicNumber(MagicNumber);
I was searching about the partial filling of orders and what happens with the ticket of a position that derives from it. I have found out that the ticket of a position is the same as the ticket of the issued order, as stated by mt5. Following this statement, when an order is partially filled, and I
  Scripts for mt5  (10)
I'm looking for scripts for mt5: break even close all Sell on chart (by symbol) close all Buy on chart (by symbol) close all Profit on chart (by symbol)
Indicator name: My_Indicator. iCustom buffers: Buffer_7=Buy_Signal, Buffer_8=Sell_signal, Buffer_9= SL_Price, Buffer_10= TP1_Price, Buffer_11= TP2_Price, Buffer_12= TP3_Price. int OnInit () { MY_handle= iCustom ( NULL , 0 , "My_Indicator" ); if (MY_handle== INVALID_HANDLE ) {
So im new to programmer and just wanted to create a simple EA price crosses and closes above 2 moving averages , However once a take profit is hit it opens a new buy order on the next bar after take profit which I do not want, so im trying to stop same direction trades until an opposite signal has
I am beginner, any one guide me fix this error //+------------------------------------------------------------------+ //| Buy Sell EA.mq5 | //| Copyright 2021, MetaQuotes Software Corp. | //|
My ea has 2 sets conditions for both buy and sell, uses martingale, Break even and trailing stop. They all work as written on the tester but on the Demo, it doesnt even move. My conditions are: Buy and break even and if previous buy on the next candle open Buy using martingale then trail. For those
Hi All, I am interested in implementing EA through the Strategy Module CExpert Class and etc however reading through the documentation I think it's still lacking. Can anyone point me to any more detail documentation on these classes. Or better is there any examples/explaination (in code) for it
Hello everyone, Please Help me to solve the issue. I tried a lot . i want to get bollinger band Upper and Lowe Line Price, and i already tried to do *** Please Help| Thank you in advance
Hello everybody, I have a problem with my Expert advisor For example : If I want to put Buy-Limit in step 5 Pips of the present price the problem is when the price changes ,the position of Buy-Limit will change to make the same step (5 Pips) my Code is trade.SetExpertMagicNumber(MagicNumber);
I make an EA, on D1 timeframe, sometimes when Open Order or Pending Order Error: failed [Market is closed] error = 132 I know Market is Closed can be caused by various things, but as we know, that the EA is run if there is a new candle that is formed so the EA certainly will not be run if it is a
While all conditions are met, my advisor is still not executing certain trades where it should be. For example: *** at this exact moment, the comment at the top left of a chart reads 5 true's, meaning each condition to sell off the current position has been met. However, the candle closes with no
Hi all, I am trying to use the the Python library MetaTrader5 to elaborate the data in Python and then send an order to the metatrader5. I am not able to send an order using the function order_send(). I always receive the retcode 10013. I am struggling with this problem for days. Could someone help
Hi, When I try to place a trade using python with the MetaTrade5 library it give me this error : EURUSD not found, can not call order_check() I dont know what am I doing wrong...Here is my code for the buy order: #BUY ORDER # prepare the buy request structure symbol = "EURUSD" symbol_info =
I need to place in the robot opening positions when the spread is less than 15 points and opening only one position at a time and on one signal or one for 20 minutes
Hi, I red somewhere an EA has a single thread running all of its code, making mutexes/semaphores not needed to handle the code inside it. Unfortunately I have a situation which may require a mutex of some sort: I have an EA that handles both OnTick event as well as OnChartEvent, when the user sends
[Deleted]
I'm new in the world of programing and i read a few articles on writing expert advisors , and i tried to write my own one but i keep getting these two errors : '}' - unexpected end of program '{' - unbalanced parentheses I don't know how to fix this can anyone tell me what should i thank you
Would like some help here, I'm unable to get a "posOpen" value (Comment(posOpen)) without an "undeclared identifier" error. Here is a segment of the code void OnTick () { double priceClose = ( iClose ( _Symbol , PERIOD_CURRENT , 0 )); // Var holds current close price of bar double priceOpen =
I've created a dialog based on CAppDialog. When I click a control on the dialog, the mouse click passes through to the chart below. I want to use the dialog to select an action , such as a radio group item the action, but only fires when the chart is clicked, not when the dialog is clicked. How do I
Hello everyone, total beginner here : I'm trying to develop an Expert Advisor, and while I am able to test against historical data (backtesting) using the strategy tester , I can't find a way to simply "attach" to a chart and receive live data continuously (most likely in the OnTick() function)