Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Experts

One Two Three - expert for MetaTrader 5

Published by:
Vladimir Karputov
Views:
5469
Rating:
(23)
Published:
2018.10.25 18:39
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The author of the idea - Martes

mq5 code author - barabashkakvn

The EA applies iChaikin (Chaikin Oscillator, CHO) indicator to define the market state: flat or trend. 

Positions are opened only when a new bar appears (and only if there is an open signal), trailing works at each tick (the opportunity to move a stop loss level is checked at each tick).

Flat definition principle

The EA takes CHO: Number bars for flat bars and checks the condition: Chaikin Oscillator value should be within the range from "-"  CHO: Flat level to "+" CHO: Flat level on all used bars. Valid accuracy - Channels Flat or Open. Suppose that Channels Flat or Open is equal to 90%. If out of all bars, 90% or more are within the range from "-"  CHO: Flat level to "+" CHO: Flat level, there is a flat.

One Two Three flat

Now, what should we do with all that data?

In case of a flat, we simply wait for a new bar's arrival. Otherwise, check Chaikin Oscillator value on bar #0:

  • if Chaikin Oscillator on bar #0 >= CHO: Open level => BUY open signal
  • if Chaikin Oscillator on bar #0 <= - CHO: Open level => SELL open signal

For EURUSD M5, the default values are written. The test result:

One Two Three test

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/22127

EA Close EA Close

The Expert Advisor based on two oscillators: iCCI (Commodity Channel Index, CCI), iStochastic (Stochastic Oscillator) and one trend iMA (Moving Average, MA) indicator.

Rollback system Rollback system

Defining the channel width for a previous day.

Volume_Price_Momentum_Oscillator Volume_Price_Momentum_Oscillator

Volume Price Momentum Oscillator

XHullTrend_Digit_HTF XHullTrend_Digit_HTF

XHullTrend_Digit indicator with the timeframe selection option available in input parameters