Expert Advisors and Automated Trading - page 69

I have used Strategy Tester in MT5 and it gave me invalid open prices, while showing 100% history quality! Before placing a trade I have checked that ask and bid are not zero. As you see on the following screenshot. The open price of EURGBP and AUDJPY are showing 0. And based on this open price the
Hi. I use this void to open my trades and i get error 4756 which from what i understand is invalid stop.BUT i do not set either sl or tp. /////////////////////////////////////////////////////////////////// void SendOrder( string thissymbol, double found, ENUM_TIMEFRAMES TF2 , double buys, double
Hello MQL5 community. Please I'm very new to MQL5 programming . I want to create an EA that opens a buy and sell pending order on each 5min candle that has closed. The EA starts at the first 5 mins candle of the day that has closed , pend a buy at 1 pip above the high of this first candle that has
  Robot by GPT  (4)
Hi all. Always burned with the idea of automatic trading. I myself have never been a programmer, and even when I tried to get into it, none of this worked. But then I found out about the all-smart Gpt chat that even writes code to disk. After asking the right questions, he gave me a trading
I spent hours optimizing in mt5 and ran a single test based on one of the results. When I tried to run other results and that same set again, the EA does not place any trades. Does anyone know why this happens?
Hi, I have a strategy that will open limit order at multiple price point. This time I tried to use switch case operator in my code, here's the result: if (InpLotMode == LOT_MODE_EQUITY_RISK_PCT) { for ( int i = 4 ; i >= 0 ; i--) { double price = 0 ;
  OpenCL loaded?  (3)
Hello, I have no idea of why OpenCL is loaded. Can someone help? I didnt do anything to load OpenCL
  Emulate Slippage  (3)
Hello, When I click on "Emulate Slippage" at MT5 backtest, I dont find setting relate to slippage emulating, can someone shed light on how to set this
Hi, today when I opened mt5 strategy tester I am getting an error, while it was working fine when I turned off my pc last night. When trying to backtest I get the message "connection closed" on core 1. I have tried to install a new mt5 terminal but I get the same error message. Does anyone know what
Hello! I would like to obtain the maximum and the minimum price of an asset from a specific time range, lets say I want to obtain the max and min between 0:00 and 06:30 AM. How can I retrieve that? Thank you
Hi, how can I get the value of the stochastic ? I'm using this: int iStochasticResult1 = iStochastic ( _Symbol , PERIOD_CURRENT , Signal_0_Stoch_PeriodK, Signal_0_Stoch_PeriodD, Signal_0_Stoch_PeriodSlow, MODE_SMA , STO_LOWHIGH ); //- is a function that returns the symbol name of the current
hi community, I cannot open position with SL direclty. [if I entry the value as 4th position - system doesnt accept] if (!trade.Sell(lots, NULL , bid, 0, 0 , "comment" )) Print ( "error on sell open position" ); so I add BuyStop afterwards: if (!trade.BuyStop(orderLots, buyStopPrice, _Symbol
  strategy tester  (6)
Hi all the strategy tester always stop after two week (no more than 10 days of strategy simulation even if i asked to simulate the strategy on 4 may to 29 may ) anyone know why? which are the limits on data calculation? thanks
i having an few problem which is first i change abit an code then the EA cannot start trading anymore , the journal is running the chart only , second issue is if opened an buy/sell order,then closed order will direct open another order, my code to trigger open trade which is refer RSI indicator
Hello, I created an EA for both MT4 and MT5. When uploading the MT4 EA to the Marketplace, all validation succeeded with no errors. When uploading the MT5 EA to the marketplace, though, I get the error: 2020.04.30 02:05:30 failed instant sell 3.3 EURUSD at 1.08735 sl: 1.08768 [Invalid stops] I am
I have written my first trading robot using mql5 and tested it on the demo account AMP Futures have provided. As I was trying to run the robot on the live account all the pending orders have been cancelled immediately after being accepted by the trade server. So I have written a small piece of code
Hello everyone, I want help how can I code an EA that open a lot 0.21 then close the partial profit or loss of 0.20 instantly then let the remain lot size of 0.01 to run until take profit ? I want all my position to be opened this way. Thanks in advace for you reply
Hello everyone. Is it possible to set up/create an EA that "never loses money"? I've recently stumbled upon such a thing but it simply looks too good to be true. Does anyone know of such system? Any recommendations? Thank you
Hello everyone, I have recently designed an automated trading software for myself and encountered an issue during live trading that I would like to share and seek solutions for. When I use the Virtual Private Server (VPS) provided by the MQL4 platform, my trading positions are automatically closed
#include <Trade/Trade.mqh> CTrade trade; input int stoploss = 5 ; input int takeprofit = 3 ; int candleG; //+------------------------------------------------------------------+ //| Expert initialization function |
Hello everyone , i wondered if i could get some assistance or suggestions here, Im very new to coding and have been studying it for just 5 weeks i have wrote a code which works more or less, one problem with it is that sometimes it will enter two open positions. For example it can buy to open a
hi everyone, hope you're well I found this function on this video here from @ Tobias Christian Witzigmann , can you confirm that the variable previousTime is read only once with al static function ? bool IsNewBar(){ static datetime previousTime = 0 ; datetime currentTime = iTime (
hey there, i am trying to work out how to draw a line on the opening price of a range i have defined in my EA. I am able to draw the high of the range in green, the low of the range in red... but i cant figure out how to draw the actual opening price so i understand the concept if the lastTick.time
I can't seem to find a clean piece of code to continually place the same order after it TP. Should the magic number be used? Example: If the buy order triggers at 5 and takes profit at 8, what would the code be to immediately place another buy order at 5. And if the price keeps going up and down as
Hello everyone, im struggling with backtesting EA. Normally when I backtest with visualized chart, it will run through smoothly. But with the code below, it doesn't do it quickly any more. Even if I just run the backtest without chart, it will eventually disconnect and stop the test after a few
Hi. How can i get the same function as OrderLots() in mql5? Alternative
what is the equal of this mql4 code in mql5 : double PointValuePerLot( string pair= "" ) { if (pair == "" ) pair = Symbol (); return ( MarketInfo(pair, MODE_TICKVALUE)/ MarketInfo(pair, MODE_TICKSIZE) ); // Not Point. }
I can't pass the MQL5 validation test for my EA. It keeps giving me this error. test on EURUSD,H1 (netting) 2020.05.26 12:02:03 failed instant sell 5 EURUSD at 1.09610 sl: 1.19611 tp: 0.99611 [Volume limit reached] Even though I checked the max and minimum volume for trade and also checked lotstep
hello is it possible in mql5 to set a different magic number for each position ? i searched but i cant seem to find how can i do it anyone can help on this ? thank you
hello, I'd like to run many test with different parameters and/or on different pairs automatically. for example I'd like to test my EA on EURUSD2012 and CADCHF2011 wihtout having to manually restart backtest at the end of the first run, in this way I could let my laptop work overnight and collect