EMA with a horizontal and verticle shift

Forums ProRealTime English forum ProBuilder support EMA with a horizontal and verticle shift

Viewing 15 posts - 1 through 15 (of 28 total)
  • #193061

    How would i code an EMA 3 with a 1 bar horizontal shift and a 0.034 verticle shift?

    #193071
    JS

    y = ExponentialAverage[3](close[1]) + 0.034
    Return y

    #193074

    thanks, and if i wanted a verticle shift down would it be

     

    ExponentialAverage[3](close[1]) – 0.034  ?

     

    also does return y needed to be coded underneith? if i was coding using ema3 as the name should it be this…

    ema3 = ExponentialAverage[3](close[1]) + 0.034

    return ema3

    #193076
    JS

    True, plus (+) is a positive vertical shift and minus (-) is a negative vertical shift.

    You can use any name you want.

    #193079

    thanks, is it necessary to put “return ema3” under the line?

    #193080
    JS

    An indicator must be closed with RETURN

    Return EMA3 will show the values of the EMA3 in the graph.

    #193106

    Thanks, I have done this:

    ema3 = ExponentialAverage[3](close[1]) + 0.034

    return ema3

     

    and the return is underlined red showing an error

    #193107
    JS

    Do you use the above line in an automatic trading system?

     

    #193113
    JS

    Example Trading System with EMA3

    EMA3Plus = ExponentialAverage[3](close[1]) + 0.034
    EMA3Min = ExponentialAverage[3](close[1]) – 0.034

    If Close Crosses Over EMA3Plus then
    Buy 1 contract at market
    ElsIf Close Crosses Under EMA3Min then
    SellShort 1 contract at market
    EndIf

    Graph EMA3Plus as “EMA3Plus”
    Graph EMA3Min as “EMA3Min”

     

    #193127

    yes its is to detect conditions for one line bing over the other by a set distance.  I have the code i’m just looking to find the correct way to set up the verticle and horizontal shift. The return was new to me but showed up as an error when i tried to implement

    #193133
    JS

    Have you already optimized your system?

    #193179

    Yeh I’m just experimenting with different ways of setting up the averages

    #193393

    moi j’aimerais pouvoir déplacer horizontalement un indicateur quelconque vers la gauche ou la droite

    I would like to be able to horizontally move any indicator to the left or to the right

    #193417

    @MIKE PAPY

    Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.

    Please abide by the rules highlighted in yellow (below).

    Thank you 🙂

     

    #193418

    With RETURN you can only move the indicator to the left, i.e. the past value is plotted currently (not in the future, though), such as:

    you cam shift both ways using graphic instructions (DrawSegment) by:
    – repainting current data into the past
    – plotting cuurrent data into the future.

    In any case each indicator must be programmed to behave this way.

Viewing 15 posts - 1 through 15 (of 28 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login