average EMA penetration

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #159598 quote
    smborowicz
    Participant
    New

    Hello,

    I am currently reading Alexander Elder’s “The new Trading For A Living” book and he describes setting a BUY target at an “average EMA penetration.”  I am looking for an indicator that can give me the following value:

    on a daily chart, if EMA value is in an uptrend, looking back at last 40 bars:

     

    calculate an average penetration :

    if closing price is lower than EMA, then subtract the closing price from the EMA (average this number for the last 40 bars)

    estimate the EMA of tomorrow:

    EMA tomorrow = EMA of today + (EMA of today – EMA of yesterday)

    Calculate an entry point:

    EntryPoint = EMA tomorrow – average penetration

    return Entry

     

    Is it possible to program this as an indicator?

    #159604 quote
    robertogozzi
    Moderator
    Master

    There you go:

    MyEma  = Average[20,1](close)
    IF (MyEma > MyEma[5]) THEN
       IF close < MyEma THEN
          Diff        = (MyEma - close)
          Penetration = average[40,0](Diff)
          FutureEma   = MyEma + (MyEma - MyEma[1])
          Entry       = FutureEma - Penetration
       ENDIF
    ENDIF
    RETURN Entry AS "Entry"

    I considered EMA being on an UPtrend when it’s higher than 5 bars ago, but you can change it as it best suits you.

    smborowicz and willi thanked this post
    #159609 quote
    Vonasi
    Moderator
    Master

    This might be of interest to you:

    Average Penetration Indicator

    smborowicz and willi thanked this post
    #159611 quote
    smborowicz
    Participant
    New

    Many thanks you to you both this is perfect!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

average EMA penetration


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
smborowicz @smborowicz Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by smborowicz
5 years ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/27/2021
Status: Active
Attachments: No files
Logo Logo
Loading...