Expert Advisors and Automated Trading - page 108

Hi, I'm testing an EA on Strategy Tester with the debugging mode on MT5. I put a break point somewhere and wait for it to trigger. Then, I store the value of PositionsTotal() on a variable to debug it. While on my trading tab, I can see two open positions, the PositionsTotal() is returning only one
Hello everyone, hope everyone is doing amazing. I open all my trades by hand and was wondering if someone has an EA for mt5 that will close all open positions right when two moving averages cross. The two moving averages which need to cross in order to close all the open positions have to be the 1
Hi im trying to get the total number of contracts traded per ticket so i can use it in my EA. I have gotten the ticket number and the current volume, but cannot get the initial volume
Hi, I am toying with MQL5 and wanted to print some info to the journal. This should happen in OnInit() Print(" Symbol selected: " + Symbol()); Now my expectation is that this msg is printed in the journal when I attach the EA. However, nothing happens other than: 2020.09.20 13:26:23.209 Experts
When I want to test my trailing strategy. I found that turning point of the curve was at around May when I use " Every tick based on real ticks". And when I switch to "Every Tick" mode, the curve keeps the uptrend. In MT4, it just doesn't trade when it's out of tick data. But in MT5, it switches to
I'm wondering if there are tools that can make automated trading by use of an indicator (*****). So in fact idea is to automate trading with using an indicator
Hi, I have a question. I would like to start programming in Python for MT5. Does anyone have any examples or where could I download a python scalper that would serve as a base
Hello, I am performing partial close on yesterday positions. I noticed that sometimes the SWAP is closing proportionally with the lot size of the partial close order. Sometimes instead swap get fully closed in a partial close, without accounting for the lot size. In the screenshot below you have one
Hello. How can i stop ea (don't lose time for testing) if an invalid input has placed??? Example: I use (for testing) for a macd a range of fastema 8-18 and for slowema 14-24. I don't want test the combinations that fastema>=slowema (14-14, 16-14, 18-14, 16-16, 16-18, 18-18). I think place [OnInit]
I need an automated trading bot for selling and buying with the offers and demands of the markets. I need it fully automated and to be able to send it to work for periods of 1 week to 1 month. Anyone can help find this
Is my idea feasible? If so what gotchas do I need to lookout for? Is this even the best idea or should i just completely write everything in Python? A quick background check about me: I already know how to write bots in MQL5. I have used python before but for a completely different scenario (e.g
Hello, Is the difference between the real ticks and the test ticks only due to the optimization and the hardware of the machine or is there another way to improve them ? Thank you for your answers
if ( PositionsTotal ()> 0 ){ for ( int i= PositionsTotal ()- 1 ; i>= 0 ; i--){ string symbol= PositionGetSymbol (i); if ( _Symbol ==symbol) { ulong Ticket = PositionGetInteger ( POSITION_TICKET ); double sl = PositionGetDouble ( POSITION_SL ); double tp = PositionGetDouble ( POSITION_TP ); double
Can you please help me identify where i went wrong? i tried to combine 2 tutorials... an RSI where the EA will take a sell if price is above 65 and buy if price is below 35 max 2 trades at 1 time... and using calcLots to work out 1% of the account balance ... it wont take any trades when prices
What happens when there is an update and the expert advisor has an open position? It will lose all closing parameters set up within EA ? If that is so, is there a way to mitigate this situation ? Global Variables ? Store and retrieve parameters after the update is done ? The same question/doubt is
I have been always told the indicator handle should be assigned in the OnInit() in MT5, however if the indicator parameters will be changed in the OnTick(), for example indicators MA 's period will be varied in the OnTick(), how to address this problem
I have a martingale strategy and I have for example 10 trades open and I would like to code it into ea so that it shows me one TP for all trades and when the price reaches there to close all trades, do you know how
  StringToEnum  (24   1 2 3)
Hi everybody, It's possible to convert an enum to string though EnumToString. What about the reverse operation? There's an way to convert it back (other than create and function and compare item by item)?
I have subscribed new signal but system not taking trade. It's showing some error.. I'm attaching error screenshot please help me.. what I do
I have an EA that logs information (errors, trade data etc.) to log files in the form of .txt. If I move this to a VPS, do I still have access to these files? I can't see anything obvious saying this here: https://www.mql5.com/en/vps If I can, can someone point me to some documentation on how to do
Hi, someone please clarify, how the balance in the account will come down, when there is no stoploss given. See the below image, it is showing a drawdown which is at the midlevel and the balance blue line is touching upto the bottom, sometimes during testing, the balance drawdown is going negative
[Deleted]
How near can I set pending order from current price? Is there something at symbol properties I can look at for this
Hello. when my expert advisor is back tested some of the open orders stop losses are modified by a trailing stop function. Sometimes during these instances an invalid stops error is returned failed to modify, and every time the modification of the open orders stops is the same. The error is "failed
Good Day Everyone Could someone please assist me with a settings file/text document for trading BTCUSD on AvaTrade. <Deleted>
I developed an ea that automatically displays the fibonacci levels on chart. Does anybody know how to add a level at 78.6%, which will be added automatically to my levels? I already know how to compute it manually,but i would like to create a code which displays the level in automatic. Thank you in...
Hi! Is it possible to have two accounts at MT4 and make one copy the other? If so, how is that done? Kind regards, Per
  Crossover ADX EA  (2)
Hi, I am looking for a free or very cheap EA that uses crossover ADX to buy and sell whatever timeframe. I would like it to be automated and that I can see the arrows. Every time there is a green arrow I want it to buy and every time its a red arrow I want it to sell, without exception. I have tried
Hi guys,is there anyone who can help with creating an MT5 object that can delete existing pending orders opposed to the ones taken? ive created an order cancel object but it based on the balance condition,and im looking for a condition that cancels the opposite orders that were not triggered.Please
Hi,ive created this pending order EA ,it was working well,all of a sudden it started returning the invalid stops error.Can somebody help please
How do toy round up or down price value to whole numbers in Mql5? for example: EUR/USD = price now: 1.1796; Round up: = 1.1800 round down:=1.1700 USD/JPY: Price now= 109.45 Round up: = 110:00 round down:=109:00 Thanks