Hi, Bid & Ask price always zero for most of the symbols using python symbol = "CAG" symbol_info = mt5.symbol_info(symbol) print(symbol_info.bid) print(symbol_info.ask) for below symbols price are available AAPL__188. 28 ADBE__495. 32 ADI__190. 6 ADM__78. 61 AES__21. 07 CFG__26. 75 DAL__48. 17 K__67
Hello, this position is sent with magic number -1. When i'm hover the position, MT5 shows me this ID, but the position have Magic -1. It's a MT5 bug? Thanks so much
I am backtesting an EA and for some reason whenever I open the backtest and select the option visual mode these two lines appear on my chart. One above the price and one very next to it. I tried using other experts but it didn't disappear. Can someone help me
Hello everyone Im struggling with getting the date out of mql5... ive read all that mql5 instructions... but im too stupid to get it right as it seems. I initiate these two functions: bool TradeDayOfWeek() { MqlDateTime tm; TimeCurrent (tm); int day = tm.day_of_week; return ((TradeMonday
Good afternoon forum, I have created a grid bot which trades in both directions (treated separately); the initial buy order and subsequent sell orders have their magic number set as: 1111. The initial sell order and subsequent buy orders have their magic number set as: 2222. Each time an opening
Can anyone help me to code this code correctly? I need a string variable and still don't quite understand how to do it. ... Improperly formatted code removed by moderator. Please EDIT your post and use the CODE button (Alt-S) when inserting code. Hover your mouse over your post and select " edit "
Hello Everyone, I'm new here, long time ago I used to be a programmer - changed my mind but I restarted a few weeks ago to build my own trading script. I'm used to stock markets - not with Forex - but I did read a lot about it, and try to understand everything I've read. I've got good notions about
hi, Im writing a simple EA. this is my code: //+------------------------------------------------------------------+ //| ProjectName | //| Copyright 2020, CompanyName | //|
I open 5-6 positions from the MetaTrader 5 Terminal. Then, via Python-instruction ‘positions_get()‘ I download the open positions and put them in a pandas dataframe. After that I close all open positions with ‘order_send()‘. The problem is that I can never close all positions. Sometimes it only
Hi Guys, I am trying to code a mt5 EA. I am struggling with the TIME array. I have managed for my code to operate however it opens thousands of trades once conditions are met, to mitigate this I am trying to make it so it can either only trade 1 trade at a time (problems with EA seeming to stop
hi all, i am looking for help in understanding the differences in coding for mql5 EA , between forex and indices (example dax30) and commodities. The request is open-ended and not specific, because I guess there are various data to set. I am waiting for someone who works with EA on indexes like
request = { "action":mt5. TRADE_ACTION_PENDING , "symbol":symbol, "type" : mt5. ORDER_TYPE_BUY_LIMIT , "price": float (price), "volume": float (ORDER_UNIT), "comment":'Test_code'
What is the difference between Buy() method and PositionOpen() method in CTrade class? if they are the same, whats the point of having two different method that basically do the same thing in CTrade Class
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
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.