Expert Advisors and Automated Trading - page 41

To post a new topic, please log in or register
hi, I was wondering why my file (Test.txt) get deleted when i try to read from it using FileOpen. here is the code : int OnInit()  {      int h = FileOpen("Test.txt", FILE_READ|FILE_ANSI|FILE_TXT);      if(h == INVALID_HANDLE)         Alert(GetLastError());      else...
Hello, Please help me find a solution to get the slope/gradient of MT5's regression channel object extending over any number of bars that I've specified.
I'm trying to select a symbol and get its last price string symbol="ANY_SYMBOL_HERE";double last;bool ok=SymbolSelect(symbol,true); // OK is Truebool ok=SymbolInfoDouble(symbol,SYMBOL_ASK,last); //  // OK is True// last is zero SymbolInfoDouble returns true, but the variable is zero. If I add a...
Can I subscribe to a paid signal and start using it on my demo trading account and then switch it to my real trading account?  I searched on this and came up empty. When I did a more generic search of real and demo accounts, I got a lot of conflicting info. Is there no "noob" forum here? 
  CopyTicks MT4 (5)
Is there a way to mimic or replicate the CopyTicks function in mql4
Can someone help me replace these orders with the market for LIMIT orders (Buy_limit / Sell_limit) as it does not fit all the code here I will leave part of it Thank you! //==========================================================================//INPUT PARAMETERS...
The last tick of the week before the market closes will normally trigger EA processing.  This processing can result in a trade request being sent to the broker, usually within a fraction of a second.  If the broker closes the market IMMEDIATELY after the last tick, the request will be rejected with...
i testes it on demo for 2-3 weeks have a good result but it will work on live to? drawdown 10%
What i mean is that i want my EA to close my position if a certain criteria occurs. For example, my EA works on stochastic operation and i want to close a buying position if stochastic is above 80, and vice versa on selling position 
Hello, I have been trying to convert the below code from mql4 to mql5 but am getting errors. I am new to this and would appreciate if any experienced programmer can help. The code was originally written in mql4 and the purpose is quite simple i.e. to start labeling with each click. (1) , (2),.. (5)...
Hi  I know that I could ask this in freelance but just wondering if anyone knows of an simple EA that could place custom pending orders automatically on given day? I've tried searching in marketplace and does not have what I'm looking for. The EA is able to place pending orders on specific time,...
why does my ea miss some trades in real account in broker i am using icmarkets.  And demo account it takes all trades?? why is that maybe broker playing around with us.
Hi  I rent a VPS for a month and I run it , My question is when synchronization  With expert advisor and completion Should I turn on automatic trading or close it ,  because it closes automatically when I activate the VPS ? Should I add the expert advisor to the planned ? And how to choose the...
I'm trying to create a new indicator that calculates the sum of a array (matrix of 5 symbols with correlation) and divides by a specified number. The calculation is correct, but i'm having problems with the indicator plot. Probably in the OnCalculate part. i want the indicator look like a moving...
Greetings community, First post.  Thank you in advance for any help.  In general, does an MT5 EA base aggregation period (H1, H6, D1, etc.) off the chart that is in view in MT5 when you activate the EA or can the aggregation period be changed in the script?  Are you able to use different aggregation...
Hello, Would there be a way to have orders sitting in the queue that when crossed would turn to limit orders? Example: Market is trading at 2654 i would like to have a buy limit  entered at 2654.25 but i would like to see price hit 2654.50 before the limit order is entered at 2654.25. I was...
I wanted to share this project with the community, but I don't have the time to properly document it and share it in the codebase. WebSession is a high-level framework for creating a persistent web session object. Those with a solid programming background should find this easy to use and...
Dears, as it is clear in subject i want to work with file in EA inside MQL5. be informed below code tested on MQL4 and worked properly. Also i know i should insert file in EA separately to be used (another WHY in MQL5) using below code #property tester_file "ALL_2018.csv" i created an array of...
A major missing element in the MQL language is a universal None type like in Python. MQL5 has "WRONG_VALUE", but with double, for example, it sets the value to -1.0 which is unacceptable in most cases. It became an obvious issue when I was debugging a substantial project and come to find-out that a...
I want to declare these to variables in an EA: int ema_lookback = 10; double ema_wgt = (2 / (ema_lookback + 1)); When I declared both globally then ema_wgt was initialized as 0, and I found that a global variable can be initialized only by a constant. So then I declared ema_wgt globally and...
I have problem with a EA i have Buyed: in the Log file is written: 2018.10.09 23:16:11.586 EA i have Buyed MT5 invalid license (538) 2018.10.09 23:16:11.588 Tester loading of ->MetaQuotes\Terminal\D3F00B3E71AF016EE6A9C2CF87E573ED\MQL5\Experts\Market\EA i have Buyed MT5.ex5 failed .. it happend...
Hello guys, Anyone knows if MetaQuotes have any plan to make MQL5 (or MQL6) meets some language standard, like C++11 (ISO/IEC 14882:2011) or any other? This could be a great step to professionals that work with programming, and also can make MQL more competitive, more reliable, easier to convert...
Hey guys, I'm new to ea-s,  I need a little help here how can i make ea to place a trade when 2 indicators give signals together? for example when MACD signal line crosses main, check if stochastic has crossed too, if it has place a trade.
Hi Guys, i am looking for a way to hide the UI of an EA from my mt4 chart. I dont want to remove the EA, but only hide the UI. See the attached image and i think it is clear what i mean. The problem is that the interface of the EA is covering the text for my sell, buy, SL and TP orders. An...
I developed a scalping trading system, and user a fixed ticks interval.  Now I am trying to upgrade for a variable interval using ATR as reference.  I am 100% blind on this.    I´ve never used indicators before and don´t now how to do it. After some reading and search, my best try was:  Thanks in...
Hi, Do you know of any EA that closes all open trades and pending orders if a predetermined price is reached ? Thanks.
Hello MQL community! This is my first question here, and hopefully its not a stupid one. The Problem: My EA is available here: [link to the Market product was deleted by moderator] and everything works great, however due to the nature of me EA, the settings list is massive. Looking at it is simply...
I am using MT5, demo account. I have a EA that will do PositionOpen for buy and sell and I found that all my buy position failed and get requote message. Here is my code for buy and sell position:     #include <Trade\Trade.mqh> CTrade g_Trader; ResetLastError();    if (!g_Trader...
Hi I have EA which opens a file to read some parameters. The file is placed under \mql4\files , this was working perfectly when I used to run this on my own machine. However after I synch this virtual/VPS, I get file open error  C:\Hosting\instances\  May i know if MT4 virtual hosting allows our own...
In a grid system of orders of one type (example buy limit) Ineed to know the values of price levels when the order is opened or closed. I need to know the last 2 price levels in which an order hasbeen opened, closed, or opened and closed. If the orders are, for example, of the buy limit type, I...