Expert Advisors and Automated Trading - page 172

Hi, I am using the following formula for the volume, and while multiplying it is giving result in digits and am getting invalid volume error while testing trade.BuyStop(( 5 *Buyvolume*LotMultiplier),( SymbolInfoDouble ( Symbol (), SYMBOL_ASK )+ 3 ), Symbol (), 0 , 0 , ORDER_TIME_GTC , 0 ,commStr);
Hello, I want to put a check sign on a pre-defined value on the chart. For example the high of the candle I marked below is 0.99758 where I want the check to be. The high value of 0.99758 has to be a pre-defined value. How do I do that? Thanks
Hi, I've bought an EA, but I've found out that it is a Fake EA and basically the quotes are part of the code, to make it looks very promising. For obvious reasons I want my money back. How do I need to proceed to get a refund? Should I use the Purchase Protection Insurance of my Credit Card? Please
So I have an EA that works properly and at the OnDeinit() function it exports certain backtesting data from the strategy tester into an excel file. Such as total trades, winning trades, drawdown etc. When running the built in strategy tester on individual currency pairs like AUDJPY and it works as
Hey, Is it possible to customize the strategy tester report which can be exported to xlsx or html format I just need to remove few fields in the output report...Is that possible
This is one thing I can't find the answer. Is it possible for a first Deal NOT to open a Position? I am trying to get Position/Deal history in order to NOT open a second position within the same hour. Since MQL5 does not seem to have a Position History like MQL4 did, I want to be sure that I am
Hi, I want a guide to see how to make EA monthly subscription based, and how to protect it against theft of source code ? Thank you
Hey! I have set up an EA that buys at ASK price. I want to know if it takes (in backtesting) into account spread history and opens trades according to it or should I manually add to my TP to simulate real market
Hello everybody, i'am new with mql5 and i have some problems to write the function, which check for me if the EA already have trade on this day. I will be very grateful if somebody can have a look at my code. Thank you very much! bool DoWeHaveAlreadyOneTradeToday(){   MqlDateTime today;   datetime...
I have my ea ready but stuck in last condition. My ea takes one trade, if it is going in loss i want my ea to take new trade with double lot after 4 candles. Price must be lower than my previous buy trade. How to code this scenario
[Deleted]
I have an EA that works on boom 1000, boom 500 , crash 1000, and crash 500. The strategy computes crossover strategies but for some reason the same EA never picks trades on boom 300 or crash 300. The strategy is not specific to the 1000's or 500's. What can be wrong? The same behavior is also on the
I'm working on a scalper robot and I would be very grateful if someone could give me a tip on how to get the price from 5 seconds ago, regardless of the candle and preferably without using an array (if that's possible)! Thanks in advance for everyone's help! Hugs
How dos metatrader optimize strategies? (basic loops?, dynamic programming?)
Hi, I am going to do following: I want to have symbol as an input parameter , so I want an input variable (enum) from which I will choose the right symbol, like this: I have done this by this code: enum ENUM_SYMBOL { EURUSD= 0 , GPBUSD= 1 , USDCHF= 2 }; That works for me perfectly
Just write an ea where u extract latest deal type deal reason and check deal type==sell&& deal reason==deal_reason_sl if condition meets print on screen "check" The ea will make me understand how to use dealinfo
Hi All, I am new in MQL5/trading and was learning its coding. One thing which is very strange for me is that when I call MarketBookGet() function on some symbol, it is giving me totally different values than shown in Depth of Market. I might be missing something, due to which I came here to get
The below code not executing the sellstop order. What is that am missing? I want the sell stop to get executed once the buy order is placed. trade.Buy( 0.10 , Symbol (), SymbolInfoDouble ( Symbol (), SYMBOL_ASK ), 0 , 0 ,commStr); if (count_buys== 1 ){ trade.SellStop( 0.10 ,( SymbolInfoDouble (
My EA opened a BuyLimit with an SL and TP as shown in the image below. The order is not considered a position, which can be verified by doing a "PositionsTotal", that means I cannot use the PositionClose method to lock-in the profit. I understand why there are instances the order is not closed even
I wanted to copy a signal, but found out that there is no Signals button in the Terminal of the MT4, whereas an MT4 of another broker has the Signals button. Is it possible to get the Signals button where it is missing? See the screens of the two broker's MT4 Terminals
Hey guys, I always get error #4756 and I have no idea why... can anyone help? void OnStart () { int totalOrders= OrdersTotal (); for ( int i=totalOrders;i>= 0 ;i--) { ulong ticket= OrderGetTicket (i); if ( OrderSelect (ticket)) { string orderSymbol= OrderGetString (
i'd like to access the last three fixed values of ZigZag Highs indicator (standard one) i have seen other threads discussing the same problem but they are all in mql4 and i use mql5 Here's my code ,but no matter i change the indices , it only produces the last non fixed value of the High
  Are EA cached?  (5)
I've searched this forum and the internet and I did not find any discussion that hints that EAs are cached. I am new to MQL programming and I am trying out a simple strategy to get my feet wet with how it works. I have a simple code that looks like the following: CTrade trade; if (buyNow) {
In my EA below, I have programmatically drawn the default ZigZag indicator. I would like to access the last two fixed values of the ZigZag. How can I achieve this? I saw this post (https://www.mql5.com/en/forum/131897)but I'm not certain how to apply this to arrive at my solution #include
  Focus on MT5  (5)
//+------------------------------------------------------------------+ //| FlipChart | //| Copyright 2022, Yours | //| http://www.companyname.net |
Hello, I am building my EA with the purpose of "not closing" positions in loss. When the Close Conditions are met : a) If the current chain of trades is in profit than close in profit. b) If the current chain of trades is in loss, than hedge the loss by an opposite position with volume = to the sum
The code: void FillArray(PosArray& C) { int total= PositionsTotal (); for ( int i= 0 ; i<total; i++) { CPositionInfo p; if (p.SelectByIndex(i)) { C.InsertSort( new Pos(p)); } Sleep ( 1 ); }
Hi forum, As per the title of the thread, if I have a standard RSI EA running that I'd like to run only between a certain period of the day, is there a nice easy way of doing this? What about if I only want new positions to be limited to a time-frame but closing orders may still work? What about if
Basically the title and if doesn't then how can I get the number of total positions opened in my account across all symbols? thank you
Hi, I tried to install the MetaTrader5 package and I'm getting the errors below. Is there any solution? Thanks. ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none) ERROR: No matching distribution found for MetaTrader5
I am trying to develop a high-speed scaler EA. Let's say an EA tries to open a trade. Before the trade is recorded the next tick arrives. So the EA thinks the trade is not opened yet. Will the EA try to open the trade again, resulting in two similar trades? In other words, will the EA block until