Expert Advisors and Automated Trading - page 120

bool tradeAttempt= false ; Print ( "attemp " +pSybmol); tradeAttempt= trade.Buy(LotUsed,Sybmol,bid, 0 , 0 ,comment); Print (tradeAttempt+ " " +trade.ResultRetcode()+ " " +trade.ResultRetcodeDescription()); Hi everyone This a simple part of code that place a Buy Market Order that opens
All, I am looking to get a random number between 3000 and 5000 that will be passed into the Sleep(). here is what I am came up with, while it works, I wanted to ask if there was a better way to get the same result. the issue I am coming across is when I send multiple alerts to telegram and not all
I'm coming from trading on MultiCharts and new to using MT4, so please bear with me... I have a few questions about running live EA's that I'm hoping someone might be able to help with. I tried searching the forums and Google for answers but am having a hard time finding specific answers, so if you
Hey guys, I have about 2 years experience with developing EA's using fxdreema. I was wondering how you prepare your EA for live trading. I have done a lot of tests using sharpe ratio, recovery factor, profit/drawdown, etc. It is difficult to have my in sample tests come up with a decent amount of
Hi everyone, I have tried to find a post that answers this issue, and I couldn't, but apologies if it already exists somewhere. I would like to be able to send signals into a Telegram channel which also takes a screenshot of the chart. It turns out that everything is running perfectly, when I
My EA stopped working with icmarkets and this is a message in the journal when trade tries to execute. thanks
I have a bunch of csv files in MQL5/Files and a function that reads a csv into an array called output_arr[]. The function prototype is: void ReadCsvData( double &output_arr[], string ticker, string column= "close" ) It works fine and I am able to view close prices (or any other OHLCV values) in the
As the title say, some symbols don't have return code so I get this error and I have no idea how to solve it. Support is appreciated
  Expert advisor  (5)
So when you test an expert advisor on historical data and it gives good results does that mean it is automatically profitable in real time trading
I am trying to write test results to a file but cannot see error message and file is not created, the file gets created on my local machine but not on server and logs, alerts, etc do not show on either. I have full optimization logs checked. double OnTester () { Print ( "test" ); Alert (
So I made this simple exponential and simple moving average expert advisor nothing crazy but I'm having trouble with giving a timer for every trade it enters whether it be long or short it updates the trailing stop loss every 20 minutes can someone help or at least provided some resource that can
Hi: I wrote a very easy close-all script just for convenience in some cases. And because it is market execution, and doesn't care about the slippage (simply want to close all and leave), so it doesn't use placing price or check results. But it doesnt work. I keep getting error 4756 "Trade request...
When I look at EAs I can see their overall percentage gain since they started, but where do I look to see how an EA did the last 30 days? I can find percentage of wins and losses, but monthly gain escapes me. English is not my first language, so maybe it's called something else?! Thank you for your
Hi, I'm trying to port a ThinkScript to MT5 but struggling on this part of the code: [ThinkScript] def upper = if close[ 1 ] < upper[ 1 ] then Min(up, upper[ 1 ]) else up; How would you declare upper in MT5? Thanks, Tom
Here's the code for it //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit () { //--- //--- return ( INIT_SUCCEEDED ); }
I googled and read some pages but I am still struggling with this. Will someone please help me? double getMovAv( ENUM_TIMEFRAMES timeframe, int maperiod, int mashift, int barshift) { double myMovingAverageArray[]; int movingAverageDefinition = iMA ( _Symbol , timeframe, maperiod, mashift
hello mql5 community i have some enquiries on mt4 backtesting, if you have solutions share them. 1- backtesting works on us indices and energies but rest of market forex cryptos asian and european instruments says waiting for updates! (all can be attached on charts but issue on backtesting). 2-
i am fairly new to coding. its been two days since i have been working on this. compiling it brings 2 errors, i have checked the trade mqh file for help. but made more errors on the way. here is the code
Is there a way to make the market watch screen inaccessible from MT4? Or if not that, disable market orders from being placed with code
hi Everyone ! Can you help me to find an EA that closes all orders of specific magic number when the sum of all those trades are +x$ Thanks
I am migrating from MQL4 to 5 and having a bump ride. This order placement function I wrote isn't working. I get this error message: '61059710': failed market buy 0.01 BTCUSD [Unsupported filling mode] Can someone please help me get it right? void orderOpen( string action) { if (
Hi All, I am using MT5 on a demo account. I've created a custom symbol (EURUSD.custom), imported the same settings of EURUSD. imported 1 min bar data and tick data. When backtesting any EA (Simple MA cross), whenever I reach OrderSend() function, it through the error "failed market sell 0.01
MT5 seems to be a lot slower than MT4. I have labels that give me information in real time, for example PositionsTotal(), and it takes about two or three seconds to update after an order is placed. At first I thought it was just a slow GUI problem, but it's much worse and more concerning. I have
Hi all, I want to ask what happens if I register the EA to the VPS, when the EA creates and reads SQLite DB files? If possible, is the location of the SQLite file will be on the same cloud server or on local? And what about adding SQLite file to existing EA that already registered to the VPS For
There doesn't seem to be any information (SymbolInfo) about a full pip. Most brokers are providing 1/10 pip, which can be read out via 1/DIGIT, POINT, TICKSIZE. However, when calculating the profit using TICKVALUE, the value gets 10 times higher then the Terminal calculates (by falsely considering
All, How to close all opened positions in MQL5. Need your sample please
I tried sending an async order with the following parameters: ------------RequestDescription Trade action: TRADE_ACTION_PENDING Trade symbol: EURUSD Magic number: 0 Order ticket: 0 Order type: ORDER_TYPE_SELL Order filling: ORDER_FILLING_RETURN Order time type: ORDER_TIME_GTC Order expiration
I have this code in a loop: if ( OrdersTotal () > 0 ) { monitorTrade(); } if ( OrdersTotal () == 0 ) { orderOpen( "buy" ); return ; } I expected the EA to never open more than one single order at a time, but it sends many until I disable it. I put the output of OrdersTotal() in a label and
Hey guys, So I've got a big question. I've got this EA for the prop firm trading and I just dont want them to find out about this EA. Is there any ways to make sure that brokers would think that my EA trades are manual trades? I mean does the EA's leave any traces for the brokers? Many thanks in
Hey all. I now have a MQL5 account, an MT4 account, a broker and a signal on TG that I would like to follow and have MT4 trade automatically. Where do I start? Oh - and bonus question: Where do I put the money that I want to trade with - MQL5, MT4 or the broker? Thank you