1 (edited by Arsnuova 2022-03-01 14:11:54)

Topic: Simple Ema strategy that I cant figure out how to set it up

Hi,
how to setup the next strategy?

Go long:
Ema, 2, high, changes direction upward
Ema, 2, low, falls

Go short:
Ema, 2, high, rising
Ema, 2, low, changes direction downward.

It looks like I could use an Outside bar indicator but then I would need another logic to get a trade howevere, it is not th strategy I would like to see.

Many thanks!

Re: Simple Ema strategy that I cant figure out how to set it up

Got the closest result with this setup?

Market
     Symbol  -  EURUSD
     Period  -  M5

Trading Size
     Maximum lots  -  20
     Trading units  -  lots
     Entry units  -  1

Strategy Properties
     Same direction signal  -  Nothing
     Opposite direction signal  -  Nothing
     Stop Loss  -  None
     Take Profit  -  None
     Break Even  -  None

[Opening Point of the Position]
     Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open


[Opening Logic Condition]
     HMA
     HMA falls
     Smoothing method  -  Exponential
     Base price  -  High
     Line Color  -  Orange
     Period  -  1
     Shift  -  0
     Use previous bar value  -  Yes

     Logical group  -  A
     Signal shift  -  1
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     HMA
     HMA falls
     Smoothing method  -  Exponential
     Base price  -  Low
     Line Color  -  Orange
     Period  -  1
     Shift  -  0
     Use previous bar value  -  Yes

     Logical group  -  A
     Signal shift  -  1
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     HMA
     HMA falls
     Smoothing method  -  Exponential
     Base price  -  High
     Line Color  -  Orange
     Period  -  1
     Shift  -  0
     Use previous bar value  -  Yes

     Logical group  -  A
     Signal shift  -  2
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     HMA
     HMA falls
     Smoothing method  -  Exponential
     Base price  -  Low
     Line Color  -  Orange
     Period  -  1
     Shift  -  0
     Use previous bar value  -  Yes

     Logical group  -  A
     Signal shift  -  2
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     Outside Bar
     Outside Bar
     Use previous bar value  -  Yes

     Logical group  -  A
     Signal shift  -  0
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Closing Point of the Position]
     Bar Closing
     Exit the market at the end of the bar
     Base price  -  Close

Re: Simple Ema strategy that I cant figure out how to set it up

For some reason standard MA doesn't have direction change logic, therefore this calls for a custom indicator! I can't think of a better way at the moment.

Re: Simple Ema strategy that I cant figure out how to set it up

Strategy Properties
     Same direction signal  -  Nothing
     Opposite direction signal  -  Nothing
     Stop Loss  -  None
     Take Profit  -  None
     Break Even  -  None

[Opening Point of the Position]
     Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open


[Opening Logic Condition]
     Long or Short
     Open long positions only

[Opening Logic Condition]
     Moving Averages Crossover
     Fast MA crosses Slow MA upward
     Base price  -  High
     Fast MA method  -  Exponential
     Slow MA method  -  Exponential
     Fast MA period  -  2
     Slow MA period  -  2
     Fast MA shift  -  0
     Slow MA shift  -  1
     Use previous bar value  -  Yes

     Logical group  -  A
     Signal shift  -  0
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     Moving Average
     Moving Average falls
     Smoothing method  -  Exponential
     Base price  -  Low
     Period  -  2
     Shift  -  0
     Use previous bar value  -  Yes

     Logical group  -  A
     Signal shift  -  0
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     Long or Short
     Open short positions only

[Opening Logic Condition]
     Moving Averages Crossover
     Fast MA crosses Slow MA downward
     Base price  -  Low
     Fast MA method  -  Exponential
     Slow MA method  -  Exponential
     Fast MA period  -  2
     Slow MA period  -  2
     Fast MA shift  -  0
     Slow MA shift  -  1
     Use previous bar value  -  Yes

     Logical group  -  B
     Signal shift  -  0
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     Moving Average
     Moving Average rises
     Smoothing method  -  Exponential
     Base price  -  High
     Period  -  2
     Shift  -  0
     Use previous bar value  -  Yes

     Logical group  -  B
     Signal shift  -  0
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Closing Point of the Position]
     Bar Closing
     Exit the market at the end of the bar
     Base price  -  Close

Re: Simple Ema strategy that I cant figure out how to set it up

Logic
Opening (Entry Signal)

Open a new long position at the beginning of the bar when:

logical group [A] is satisfied: 
Long or Short filter permits long opening; and 
Moving Averages Crossover* (High, Exponential, Exponential, 2, 2, 0, 1); Fast MA crosses Slow MA upward; and 
Moving Average* (Exponential, Low, 2, 0) falls. 
or logical group [b] is satisfied: 
Long or Short filter does not permit long opening; and 
Moving Averages Crossover* (Low, Exponential, Exponential, 2, 2, 0, 1); Fast MA crosses Slow MA downward; and 
Moving Average* (Exponential, High, 2, 0) rises. 

Open a new short position at the beginning of the bar when:

logical group [A] is satisfied: 
Long or Short filter does not permit short opening; and 
Moving Averages Crossover* (High, Exponential, Exponential, 2, 2, 0, 1); Fast MA crosses Slow MA downward; and 
Moving Average* (Exponential, Low, 2, 0) rises. 
or logical group [b] is satisfied: 
Long or Short filter permits short opening; and 
Moving Averages Crossover* (Low, Exponential, Exponential, 2, 2, 0, 1); Fast MA crosses Slow MA upward; and 
Moving Average* (Exponential, High, 2, 0) falls. 

Re: Simple Ema strategy that I cant figure out how to set it up

Marti wrote:

Strategy Properties
     Same direction signal  -  Nothing
     Opposite direction signal  -  Nothing
     Stop Loss  -  None
     Take Profit  -  None
     Break Even  -  None

[Opening Point of the Position]
     Bar Opening
     Enter the market at the beginning of the bar
     Base price  -  Open


[Opening Logic Condition]
     Long or Short
     Open long positions only

[Opening Logic Condition]
     Moving Averages Crossover
     Fast MA crosses Slow MA upward
     Base price  -  High
     Fast MA method  -  Exponential
     Slow MA method  -  Exponential
     Fast MA period  -  2
     Slow MA period  -  2
     Fast MA shift  -  0
     Slow MA shift  -  1
     Use previous bar value  -  Yes

     Logical group  -  A
     Signal shift  -  0
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     Moving Average
     Moving Average falls
     Smoothing method  -  Exponential
     Base price  -  Low
     Period  -  2
     Shift  -  0
     Use previous bar value  -  Yes

     Logical group  -  A
     Signal shift  -  0
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     Long or Short
     Open short positions only

[Opening Logic Condition]
     Moving Averages Crossover
     Fast MA crosses Slow MA downward
     Base price  -  Low
     Fast MA method  -  Exponential
     Slow MA method  -  Exponential
     Fast MA period  -  2
     Slow MA period  -  2
     Fast MA shift  -  0
     Slow MA shift  -  1
     Use previous bar value  -  Yes

     Logical group  -  B
     Signal shift  -  0
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Opening Logic Condition]
     Moving Average
     Moving Average rises
     Smoothing method  -  Exponential
     Base price  -  High
     Period  -  2
     Shift  -  0
     Use previous bar value  -  Yes

     Logical group  -  B
     Signal shift  -  0
     Signal repeat  -  0
     Indicator symbol  -  Default
     Indicator period  -  Default

[Closing Point of the Position]
     Bar Closing
     Exit the market at the end of the bar
     Base price  -  Close

Good thinking, that's very clever!

Re: Simple Ema strategy that I cant figure out how to set it up

Marti,
that actually work, clever indeed!
Many thanks for your time! Cheers!