1) Idea
Based on all of the most recent x (e.g. 30) number of bars, (x = input variable)
Calculate at start of each bar:
MaxOpenClose = the maximum of ( maximum of Open, maximum of Close) of all of most recent x bars
MinOpenClose = the minimum of ( minimum of Open, minimum of Close) of all of most recent x bars
Level_1 = ( MaxOpenClose - MinOpenClose ) * Ratio_1
Level_2 = ( MaxOpenClose - MinOpenClose ) * Ratio_2
LevelCounter_1 = Number of times, in the most recent x number of bars, the High was >= Level_1
LevelCounter_2 = Number of times, in the most recent x number of bars, the Low was <= Level_2
Trading is done based on the ratio of LevelCounter_1 and LevelCounter_2
LevelCounter_1 and LevelCounter_2 will always be >= 0 and <= x
Output all these values to the journal window with each bar.
"most recent" excludes the current "in progress" bar
2) Trading signals:
if LevelCounter_1 > LevelCounter_2 ; buy signal
if LevelCounter_1 <= LevelCounter_2 ; sell signal
3) Positions are opened at the market price; subject to that there are no more open positions as specified by the MaxOpenBuyOrders input parameter for Buys
and MaxOpenSellOrders for sell orders.
A buy position is opened if LevelCounter_1 > LevelCounter_2 for lot size = LotSize ( LotSize = input parameter)
A sell position is opened if LevelCounter_1 < LevelCounter_2 for lot size = LotSize ( LotSize = input parameter)
If the order cannot be executed successfully for whatever reason, try again in each tick, for the next 10 ticks, to do again.
4) Additional filter for position opened
Minimum average volume of last x number of bars >= MinAvgVolumeToOpen (input parameter)
5) Positions are closed when
a) StopLoss (input parameter) is reached.
or b) ProfitTarget (input parameter) is reached.
6) Position management
TrailingStop is used; while the price move in the profit direction, the stop loss should trail at the StopLoss (input parameter) value.
The Stop Loss is never moved towards the loss direction.
The robot should work on any forex pair, any time frame.
Inputs:
x // Number of most recent bars to take into consideration,e.g. 10
Ratio_1 // Used in calculation
Ratio_2 // Used in calculation
MaxOpenBuyOrders // e.g. 5
MaxOpenSellOrders // e.g. 5
LotSize // e.g. 0.01
StopLoss // e.g. 30
ProfitTarget // e.g. 100
MinAvgVolumeToOpen // e.g. 40
Solicitudes similares
Hey there! I’m looking for a talented NinjaTrader programmer to partner with on some exciting projects. If you have a knack for NinjaScript and a passion for trading tech, let’s team up! What You Can Expect: A friendly collaboration on diverse projects Fair pay—50/50 split on all earnings An opportunity to dive deep into innovative trading strategies What I’m Hoping You Bring: Experience with NinjaTrader and
MT5 中运行的 EA 的主要任务 : 1 EA 将同时选择两对货币进行交易,包括 AUDUSD 、 EURUSD 、 GBPUSD 、 NZDUSD 、 USDCAD 、 USDCHF 、 USDJPY 、 AUDJPY 、 EURAUD 、 EURJPY 、 GBPJPY 、 GBPNZD 和 GBPCHF ,默认设置 GBPUSD 、 EURAUD 。 2 蜡烛图 的时间 区间 包括 15M 、 30M 、 1H 、 2H 、 4H 或 1D 。对于两对货币中的 每一对而言, 将同时密切观察两个 时间区间图。 也就是说,两对 货币 同时 打开 四个窗口,每对默认设置 15M 和 4H 。 如果 您 不肯定如何 为同一货币对打开两个窗口,请不要考虑接受这项工作 。 3 将使用自主开发的指标 CMA 结合 CCI 预测走势。 在某些特殊情况下 ,将使用 马丁格尔策略进行操作。因此,如果您已经拥有基于 Martingale
Required to develop expert advisory which will work on any pair including crypto , forex, gold, silver, oil, simple stragy which will work on RSI,GRID, take profit, grid distance, start and stop button, only buy and only sell, filter for time frame Like 5m to 4 hr. stop loss and take profit .Detail will be shared once you except order
I have a indicator, mql file. The signals are seen below on a EURNZD H1 chart. Very important to get accurate entries. The signal to trade is the first tic after the the indicator signal paints. I've tried to demonstrate that below. Other than that the EA will have a lot size escalation, an on-screen pip counter, a button to stop taking new trades, SL/TP, and magic number. I would like the indicator to be within the
I would like to create an EA based on the Shved Supply and Demand indicator. you can find the Shved Supply and Demand v1.7 indicator in the following link https://www.mql5.com/en/code/29395 NB: Checks the trading robot must pass before publication in the Market ( https://www.mql5.com/en/articles/2555 ) MQ5 file to be provided
Hi Guys, I am looking to someone that can generate an indicator for MT4 as explained below. Basically I would need that the indicator point out the price that will close my position in stop out/margin call. The indicator should pick automatically the level of trade out for the broker (which can be different from a broker to another broker) It should write (ideally on the bottom on the left) the following information
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
Hello, I am looking for a professional programmer to optimize my existing EA integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. i want it to be an EA that can be trusted to carry trade with the help of chat gpt and also have a very low drawdown