Expert Advisors and Automated Trading - page 119

I'm sending myself alerts on certain new bars, when two of my custom functions return a 1 for example, but it seems there's some slowness or lag causing the custom functions to respond to the previous bars value... I want to send the alert 20 or seconds after the new bar has started. What is the
Hi Everybody, Hope you are doing good, I want to know a best n easy way to convert mql4 to mql5 and vice versa, and should effect its working
  Rate of Change  (3)
Hello Has anyone tried to code the Price Rate of Change in an Advisor? Can you please share the code
I developed an EA that performs very well backtesting the last year, but when I run it on 2018 the result is a huge loss. 2019 also performs badly. I know that results in a certain year doesn't garantee results in other years. But I would like to be sure if this results are correct. How do I know if
Hi, I am using python to build an expert advisor. Right now I have a function which calculate the quantity by the investment but dosent take into account the leverage so how I calculate the leverage? Here is my function: def qty_buy(symbol, investment, df): try : ## price = float
IT KEFT RETURNING "UNSUPPORTED FILLING MODE" AS I TRIED TO MAKE A SIMPLE BUY ORDER VIA PYTHON SCRIPT. WHY IS THAT? CAN ANYONE HELP PLEASE
Hallo, I have script for pending order. But i need to add some function on it. - Can anyone help on how to add it as i very new on making something like this. - Pending orders can be determined from a certain price, not just from the current price. And can do Pending order on Buy limit, Sell stop
  How to make a trade copier EA?  (27   1 2 3)
Hello everyone, I want to write my own trade copier, because all available paid and unpaid do not meet my needs. What are the basic principles of making trade copier EA? We have 3 accounts live/demo with 20 traders each varying just the lot size. We have full acess to those accounts...
  Strategy Tester  (14   1 2)
How do I change the Start, Step & Stop default settings in inputs Appreciate your help :)
#include <Trade\Trade.mqh> CTrade m_trade; COrderInfo m_order; CPositionInfo m_position; void OnStart () { m_trade.SetExpertMagicNumber( 1 ); m_trade.Buy( 0.01 , Symbol (), 0 , 0 , 0 , "script" ); } //+------------------------------------------------------------------+ This script places
So I want to build a simple EA that will open several trades based on simple. I'm using 1:100 leverage. OnTick(){ if trade_condition=true Check Money Mgmt; Open a trade Go through all open trades Close if close-condition of the trade is met Modify SL & TP accordingly Q#1: I'm opening trades using
I have Rsi Alert Code i need to when my receive my Alert that time Place a order Each time Help me Anyone I will attach Alert Code #property link "https://www.earnforex.com/metatrader-indicators/moving-average-crossover-alert/" #property version "1.02" #property strict #property
Hello, I'm copytrading and I'm getting signals on my account which is running on my VPS. The problem is, after a few hours on this server, metatrader always closes with the error message "System to be shutdown, request for close PurpleTrading MT4 "followed by another message "PurpleTrading MT4
Hi guys, I am finishing an EA and I am testing it. So far everything is ok, but there are some situations that I couldn't test and it really worries me. For example: What is the ORDER_STATE of a partially filled order which has the pending part cancelled (IE. By order of 200 AAPL, 100 were executed,...
  Asset filtering  (3)
Hi Everyone, I am developing a multi-currency mean reversion strategy. I currently use instantaneous filtering to get rid of potential trades where there is high market noise, low volatility, lack of clear trend and particularly high relative volume. This has proven to be effective but I'm also
I am working with the following array of ENUM_TIMEFRAMES elements: ENUM_TIMEFRAMES H1andBelowTFS[ 12 ] = { PERIOD_M1 , PERIOD_M2 , PERIOD_M3 , PERIOD_M4 , PERIOD_M5 , PERIOD_M6 , PERIOD_M10 , PERIOD_M12 , PERIOD_M15 , PERIOD_M20 , PERIOD_M30
Ok, I won't beat around the bush. Got two different sets from the same advisor both working pretty nice so I'm trying to merge them into a unique algorithm. The problem here is that each one work through a different hedging loop which need to be identified by their own MagicNumber, and I guess
  Custom Criteria Coding issues  (34   1 2 3 4)
Will the following code work? double profit_factor = TesterStatistics(STAT_PROFIT_FACTOR); if( STAT_EQUITYDD_PERCENT < 2.5) if(STAT_TRADES > 10) if(STAT_PROFIT_FACTOR == 0.0) { profit_factor = 500; } I'm trying to make it so zero losses that have over a certain number of trades and under a
Hey all! I have the weirdest bug. My EA will not involve the Local Farm Network when optimising. This is the EA I coded myself. I have another EA that I bought that is running side by side o nthe same server and terminal and gives no issues - the local network farm is involved instantly. Is there
Hi, Initially I developed in MQL4 and it helped with leaked memory. But in MQL5 I do not get the backtester to help me like that. Is it something I can enable somehow? Thank you, Hendrik
  coding imput?  (3)
hi, i desgied my ea but it opens one synbol only once. menaing it does pen 10 different symbols but all only once untill that symbol is closed. ts only after closing the position that the ea opens this symbol again. this give sme a prolem with lot sizing menaing i cant use the maximum lots that I
Hi, Can you help me with a function that compares the last 2 values of Last_tick.bid? thank you in advance 2022.08 . 03 13 : 44 : 32.725 (Boom 300 Index,M1) Bid: 3809.291 , 2022.08 . 03 13 : 44 : 33.339 (Boom 300 Index,M1) Bid: 3809.261 , 2022.08 . 03 13 : 44 : 34.358 (Boom 300 Index,M1)
hi, I have just subscribed to a signal and the signal provider is opening Pending orders which are not being copied to my mt5 terminal. Normal trades are being copied ok. Does anyone know how to fix this please
He everybody, I have a small function to draws vertical line on Chart : bool DrawLineOnChar( const datetime time, color clr, ENUM_LINE_STYLE lineStyle) { CChartObjectVLine *line; if (! CheckPointer (line = new CChartObjectVLine) || !line.Create( ChartID (), "line " + TimeToString
why I am getting this error at this volume when the maximum volume is 500
// open a sell double openPrice = iClose ( Symbol (), PERIOD_M1 , 0 ); double valueToRisk = acc_size * risk_perc / 100 ; double sl = iHigh ( Symbol (), PERIOD_D1 , 0 ) + pips_from_swing* _Point * 10 ; double tp;
I have two pending orders open, with magic number 222 and 444. I want the ea to delete the order with the largest magic number i.e 444. How do I amend this code to perform this function? Thanks. //+------------------------------------------------------------------+ //| Delete all pending orders
So this code opens up a trade based on risk I set on EA options. Say I set the acc size to 1000 and risk to 1. That means the EA will risk 100$. SL should be at -100$. and TP is 1:1 so at +100$- lot size.will be calculated automatically. It works perfectly in Strategy tester . But on live the SL
This EA ran for almost two full days without any problem at all. Then, suddenly, without absolutely no change to the code, it doesn't work anymore. I have googled the error and I have no idea what it means. "Wrong indicator handle" is 100% meaningless to me. Can someone please explain what is going
Dear Members Just now I have started receiving UpperInn[ -nan(ind) ] Error, where as this indicator and code have been working fine for quite a months. Search on Google and Forum, did not helped much. Any help will be highly appreciated. 2022.08.01 14:29:50.270 2022.01.04 00:01:00