Hi there I'm trying to make a function to trail stop after partial close orders but this partial close is executed only one time cause there is an SL condition to run it. How this can be done? if ( PositionGetDouble ( POSITION_PRICE_CURRENT )>PClose&& ( PositionGetDouble ( POSITION_SL )<
Hello friends. I would like to know if there are any articles that I understand about semi automation of metatrader 5. Example I say that I send a CALL or SIGNAL: Open EURUSD 1.6010 SL 1.6000 TP 1.6020 but that is pending order. I would like to know if you have any command line documentation for
hello, does someone has a piece of code in order to retrieve some data like bid and ask? I am using symbolselect() and refreshrates() but sometimes I cannot retrieve data
hi guys can anyone help me out on this one am getting wrong paramater counts … am sorry about that guys void BuyTrailingStop( string Symbol , double TrailingStop, double MinProfit, int MagicNumber, double MaxStopLoss) { for ( int Counter = 0 ; Counter <= OrdersTotal ()- 1 ; Counter++) {
I am still learning to code and this code was given as an introductory sample... It used ORDER_FILLING_FOK, but with both ORDER_FILLING_FOK and ORDER_FILLING_RETURN it gave an error as "unsupported filling mode". So i tried with ORDER_FILLING_IOC. Now it opened the order but didn't seem to close it
Hi,
I get annoying problems with 2 indicators out of 4 used in my EA.
Whatever I do, the EA fails to load them, even though they get compiled successfully into resources and the other 2 indicators work fine.
They only work when I put the files into the indicator folder, which gives me the...
Hello,
I have multiple indicators and various periods that I take into account to enter and exit a trade. What are the steps to put them together in an EA so that when conditions are right I enter or exit a trade? Can I use an existing library or template where I point to my various indicators and...
Hi, I have an EA I developed and have used it for a lot of months in real time account, when it worked fine. Recently I decided to do some changes in the setups used and that lead to me to test it in the Demo account, something I normally didn't do before. And now, surprisingly, it is finishing
handleATR = iATR ( _Symbol , PERIOD_D1 , 20 ); ArraySetAsSeries (arrayATR, true ); if ( CopyBuffer (handleATR, 0 , 0 , 40 , arrayATR) < 0 ) { Alert ( "ERROR: unable to copy atr. exiting..." ); return ( false ); } cannot copy atr data. Initialization returns false. how can i solve this problem
Hi Guys, I created an EA that do Long&Short operations based on ratio and also based on spread between two symbols. In order to view what is happening on the graph I create custom symbols to represent the Long&Short. However, creating the custom symbol by my program I didn't found how to set the
Hi there, I'm having trouble with my partial close function , it seems to be not working as I get same results both if true or false. These are the lines: if (PartialClose== true ){ for ( int i= 0 ;i< PositionsTotal ();i++){ // Same result with for(int i=PositionsTotal()-1;i>=0;i--){
Hi, please excuse my noob question, but why don't i see "Ask" and the rest of the predefined variables on the list anymore? and the MetaEditor is not recognizing this "Ask" which is supposed to be a predefined Variable
Hi everybody, I are format the amount for the balance whit this code: double AccountBalance = DoubleToString ( AccountInfoDouble ( ACCOUNT_BALANCE ), 2 ); Whit this var i get for example "140.56" and its fine, but if the amount is 1590785.90 i get "1590785.90". How i can get "1,590,785.90"
@William Roeder @vladimir250273 @VLADISLAV BUTOV @Vladimir @Ahmet Metin Yilmaz @Stanislav Ivanov @Keith Watford @nicholish en @Marco Y Anja Vlaskamp Hello guys sorry for taking your time ,but I have this big problem since I started making EAs.......! Why didnt Metatrader Create a predefined
Hello, sorry my noob question but is the following: in my LimitTakeProfit.mqh file, when I compile receive the following errors 'CSymbolInfo' - parameter passed as reference, variable expected LimitTakeProfit.mqh 55 56 'CArrayLong' - parameter passed as reference, variable expected
Hello, I search how to close mt5 properly in mql5. I have a python script which launch one by one severals expert advisor. My way in python is: for expert in expertArrays: # code to prepare the configuration file subprocess.call([mt5ExeFilePath, confOption], timeout = 15 ) Python
Hello, i am with ICMarkets and Download a few apps from the website. All of the Expert Advisors does not load. Unfortunately there is no error. Could somebody help
Hi , I've understood that it is impossible to backtest a strategy on strategy tester using Depth of Market because brokers don't offers enough data to do it (correct me if i'm wrong) , my question is , how can we deal with that problem , to benchtest and optimize a strategy based on order book
I'm trying to open a BuyStop position while expiration parameter points to the next 5 hours. trying to calculate the time using (TimeTradeServer()+PeriodSeconds(PERIOD_H1)*5) function but in strategy tester it returns a fixed time all the time which is (2020.01.01 05:00:00). I wonder why when I
Hi, I am trying to implement a Recovery Strategy to an EA but it has suddenly become too heavy for Strategy Tester so it is even more difficult for me to identify the errors. I have extracted part of the code to test it but it still runs very slow plus in Real it is not providing the right lots on
Hello All, I could use some help with determining what I am doing wrong when it comes to getting the nearest quarter point to a relative price on the chart. Basically I have a fib on the Asia Range, I am looking for a quarter point above or below the Asia Range in the 50-100 Fib retracement. While
Hi everyone. I am trying to evaluate the Cotton (#Cotton_v20) market, I have imported an updated chart with Bars and Ticks from Tickstory. (This isn't the first time I've updated the charts) The problem is that when I start the backtest, Journal writes me this error: Market Closed I state that the
i'm trying to make EA iterate over number of symbols but it only performs trades on the symbol specified in the strategy tester ! could you help me find the error #define EURUSD "EURUSD" #define GBPUSD "GBPUSD" #define USDJPY "USDJPY" #define USDCHF "USDCHF" #define USDCAD
//This my Indicator #property indicator_chart_window #property indicator_buffers 2 #property indicator_plots 2 #property indicator_type1 DRAW_LINE #property indicator_type2 DRAW_LINE double A[]; double B[]; double smaVal= 0.0 ; string ValSend= "" ; void OnInit () {
[Deleted]
Hello, I am asking for help in understanding where I am making a mistake. I want to classically calculate the lot size based on the% risk with equity. I read the threads on the forum, tried in my code, but something counts wrong, the "lot" amount is too large (?) but I don't understand something
Hello Everyone, I have developed an EA, which is tested on Strategy Optimizer on MetaQuotes-Demo Server for period 2015.01.01 to 2020.08.01. I get some results which seem ok. So I decided continue on demo account of FXTM to test my EA for one month. I installed Trading Platform from FXTM, which uses
@Ahmet Metin Yilmaz @Keith Watford @Sergey Gerasimov @Vladimir Kazennov @William Roeder @nicholish en Hello guys, I have been struggling to fix this problem in my code below because it keeps opening multiple buy positions instead of printing failed to buy in the journal! //Create an instance of
Hello, Could someone please confirm or deny the following. If I "OrderSend" succesfully a TRADE_ACTION_DEAL , and within the MqlTradeResult struct I retieve a deal_ticket = MqlTradeResult.deal, is this deal_ticket the same as the ticket of the position that was created as a result of the trade deal
Hi, I'm building some simple EA to learn mql5 . I cannot understand how MetaTrader behaves after a series of orders like the following: CTrade m_trade; .... .... m_trade.Buy( 0.1 ,m_symbol.Name(),m_symbol.Ask(), 100 , 0 ,TradeComment) //price of symbol is 105 m_trade.Buy( 0.1
I have my VPS set in mql5, but for the last 2 weeks, it doesn't have any trades. However, I back-test that period, they should have several trades been take places. I am not sure about if its about the EA updates, since I am not able to do the update right now. I have deleted the chart and reput the

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.