Expert Advisors and Automated Trading - page 63

Hey all! I'm starting a personal project, a custom copier that supports MT4 to MT5 (and viceversa) communication. I'm aware that on MT4's case the common folder can be used to store and read info between terminals, howeve I couldn't find anything too helpful about communicating between MT4 and MT5
as per my search through Wikipedia, i get this answer : Algorithmic trading is a method of executing orders using automated pre-programmed trading instructions accounting for variables such as time, price, and volume. [1] This type of trading attempts to leverage the speed and computational
Hi, I limited my EA to run every minute or at the open of a new bar. I also want to do a partial close for my strategy. Because my EA only runs at least for every minute, sometimes when the volatility is high the price moves touching the partial close level and reverse at the same minute leaving the
I am using python with Mt5 and testing with Demo account This is my Close Request Data- >> Req: {'action': 1, 'symbol': 'GOLD#', 'volume': 0.24, 'type': 0, 'position': 933862679, 'price': 1919.2, 'deviation': 20, 'magic': 234000, 'comment': 'DD', 'type_time': 0, 'type_filling': 1} And this is a
I am trying to read the buffer value of an mt5 indicator , which has 4 buffers and 2 input parameters and this is how i am using it in iCustom : iCustom ( NULL , 0 , "LTD by KDMfx" ,inp1,inp2, indbuffer , candshift ); where inp1 and inp2 are the 2 input parameters of the "LTD by KDMfx" indicators
No response in Questions from Beginners thread so I'll create a new one, sorry for that! Hi. Tell me, please, how is the distance between the borders and the regression line calculated in the default Regression Channel in Metatrader ? Yeah, I know, it is said clearly in the documentation : >The
Hello all. I have 3 objects instantiated from a class in OnInit and I need to use these Objects in OnTick too, However without instantiating them again in OnTick it is not possible. I have tried passing them by reference to OnTIck and that did not work either(in this case the OnTick function does
Greetings, I'm a bit puzzled by the following. The documentation recommends calling PositionSelect() before calling PositionGetInteger(), which I'm doing as follows: int sellPositionCount = 0 ; if ( PositionSelect ( _Symbol )) { for ( long i = 0 ; i < PositionsTotal () ; i++) { if (
Dear Coders, I'm working on an MT5 Expert Advisor. I would like to use the OrderSelect() function, but it doesn't work for me. Every time I get "Order not fouund" error message. Here is my code: int ot = (int)OrderTicket();if ( OrderSelect(ot) ){   Print("OrderSelect done."); // pr() function is...
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
Hello People I am just curious if EA can commnuicate with strategytester duing its optimizaiton process. I can see that with "ParameterGetRange" and "ParameterSetRange" you can freely get and set optimizaiton parameters on strategy tester from your EA. However I have not found the ways of...
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
  New Coder  (3)
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