Expert Advisors and Automated Trading - page 68

Hello everyone, I'm trying to test an indicator that is really simple, but it take enormous calculation time during my backtest. Before adding this new feature my EA was running fine, so I checked in "profiling on historical data" and its confirmed, this part of my code use a lot of ressource ! I
Hello everyone. Suppose a candle is closed and there has been no new tick in the new candle for a few seconds. What will be the result of calling OHLC of shift=0? Will it return an empty value or the previous candle value
def start_mt5_terminal(account_credentials): for account in account_credentials: start_time = time.time() # Start the timer mt5.initialize( 'D:\MT5\MT5_1\terminal64.exe' ) # type: ignore time.sleep( 30 ) # Connect to the terminal if not mt5.login(account[
Hi guys. I have faced a weird problem. I am running my EA on GBPUSD. Every thing was ok, several positions have been opened and closed by EA successfully. However, since a position is opened, it can not be closed in any way. I am using the following code to closing: if (!trade.PositionClose( Symbol
Hello My name is Andres and im trying to write the code explained in this youtube channel with no success, I will be infinitly gratefull of somebody could helpme and post it here. this is the video where the code is. https://www.youtube.com/watch?v=CYpFHJbcXv4 thankyou very much
Hi, I tried compiling this code for an EA but kept getting an error. Please help. if (secondCandleAfterBullish) { if (! PositionGetInteger ( POSITION_TYPE )) { Trade.Buy(magicNumber, 0.1 , Ask, 0 , 0 , 0 , "Buy" , 0 , clrNONE ); } } if (secondCandleAfterBearish) {
[Deleted]
Does anyone interest in new trading method? Equal Price Indicator? We can talk about this new trading method in this topic
As the title says, copying the EA to the EA installation directory is also not available. Please ask the moderator to help answer
I have an array which gathers the value of the RSI perfectly. How is the best way to pick the highest value from the past X candlesticks? //---------------------RSI--------------------- string signal = "" ; // Create a string for the
Hi Everyone, I'm attempting to create an arrow over or under an engulfing pattern. Recognizing the pattern isn't an issue although I want the arrow to be above or below the lowest or highest wick of the pattern. So if its a buying Engulfing pattern id like the arrow to appear below the lowest wick
Hello. I have created a very simple bot to test and learn. But I have a little problem. The only thing the bot does is print data from some indicators. For example, I select a period of three days and I have a real graph with some indicators and some parameters given by me. These same parameters I
Hi I'm pretty new to this so I hope I'm not being too stupid. The 'pattern detector sample' is saved as an EA yet anything i insert in the code doesn't register. I compiled the code with no error. Next I went to MT5 and from the Advisors file, i dragged the EA onto the chart and clicked 'OK'. Don't
hi guys i just want to know whats the ticket of last closed order i wrote this just want to know if this way is correct or not and one more thing why tickets are different in terminal than actual reports or in mql5! tnX for help in advance void OnStart() { HistorySelect(0,TimeCurrent()); ulong
Hey i'm trying to build a simple program that comments Price Over when price is above the MA and Price Lower when below, but all the program is doing is saying "Price Lower" , can you explain why such a simple program is not working properly? In my code below you can see i commented out some code
All, I've been slowly implementing all the things I can think of to prevent this error and I'm running out of ideas. Here is all the functions that do something leading up to a Buy/Sell. I check margins, I check Positions, I check for Trade Stop Levels (this symbol has none it seems). See attached
Hi, Should I be able to do this? 1) Create custom symbol and import 1min OHLC bar data. This includes spread values (max value from any tick in bar interval) 2) go to the tester settings 3) Change the spread to a value (1 here) 4) Save the profile 5) Run the test 6) repeat 3) and 4) for different
All, I have a simple EA that I'm working on which is generating an RSI, then some MA's (2,7,34) on top of the RSI. int OnInit () { // other bits rsiHandle = iRSI ( _Symbol , _Period , RSIPeriod, PRICE_CLOSE ); rsiFastMaHandle= iMA ( _Symbol , _Period , RSIFastMa, 0 , MODE_SMA
Hello, I'm stuck with what should be an easy problem to solve, apparently, but I'm going in circle without finding the answer (read a lot of thread and MQL documentation). I want to check if a specific position is currently opened by using either the magic number or the order ticket of the
Hi I'm simply trying to create a button that prints "1" when I click it with the following code. However, after I added the EA to a chart and click the button nothing happens. Does this mean the OnChartEvent() function not being triggered? What's wrong in this case? Improperly formatted code
How to integrate Arrayfire library(https://arrayfire.org/docs/index.htm#gsc.tab=0)into MQL5
ulong ticket = OrderSend ( Symbol (), ORDER_TYPE_SELL , LotSize, ask, 0 , stopLoss, takeProfit, "Sell EURGBP" , 12345 , 0 , clrRed , 0 , 0 ); I wonder what's wrong in this code
Hi,  I need to deb an MQL5 EA using tick data that I would create on purpose, so to understand a strange behaviour i have noticed during real testing. If I use backtesting or real testing I may not find extreme situations that make the bug happen again. I know in 2012 it was not possible to backtest...
Hi! Today I experienced a freeze in my EA when updating a pending order's stop loss and I'd like to know what can I do to avoid this situation in the future. So, by what I noticed, when we send an order to update the stop loss of a pending order, the MT5-broker system sends 4 messages like this: DR
The values are: lot = 0.15 retracePrc = 1.23196 slPrc = 1.23409 tpPrc = 1.2277 Also current bid/ask = 1.22720 / 1.22726 This is the code where I try to open a position: myTradingControlPanel.PositionOpen( _Symbol , ORDER_TYPE_SELL_LIMIT , lot, retracePrc, slPrc, tpPrc, "Sell Trade. Magic Number #"
Hi guys! I am trying to track the high and low of the current 15min bar on a give chart. I have this script so far: //+------------------------------------------------------------------+ //| TrackHighLow_EA.mq5 | //|
[Deleted]
What of if i get the worst EAs and reverse them, would they produce me the best result considering commission , spread, swap and speed/frequency
Hi all I place an order and stoploss is beeing trigged no matter i change it to a different value. It´s not been reached. Any hint? MqlTradeRequest request={}; //https://www.mql5.com/en/docs/constants/structures/mqltraderequest MqlTradeResult result={}; ZeroMemory (request); ZeroMemory
Hi guys, I have created an EA and backtest satisfied my criteria. However, in terms of stability of the EA, I don't think it's quite reliable since I don't use deviation at the moment. Now I started a forward test but it will take me several months before I can compare results. So my questions for...
Hi, When day-trading, pulling orders each evening and reinserting them again in the morning is time consuming. Although I copy them into excel so that they can be pasted back into a new order ticket, this takes a while, particularly if there are a lot of orders. In MT5 would it be possible to...
  margin required  (2)
Good day everyone. Please how do I calculate margin required for MQL5 //I know the one for mql4 MarketInfo( Symbol (), MODE_MARGINREQUIRED) Thanks