Simple Market hours EMA Arrow and Text Indicator

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #137382 quote
    Albert KaderAlbert Kader
    Participant
    New

    This is my first attempt at creating a signal indicator using two Exponential Moving Averages and only during specified hours.

    The example given is with values for the DAX. You should adapt it to ever instrument and timeframe you use it with.

    capture-1593337317c84lp.png capture-1593337317c84lp.png capture-1593337317c84lp1.png capture-1593337317c84lp1.png
    #137963 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    The code is missing.

    #138071 quote
    Albert KaderAlbert Kader
    Participant
    New
    EMAShort =  ExponentialAverage[n](close)
    EMALong = ExponentialAverage[m](close)
    
    BuyCondition = (EMAShort CROSSES OVER EMALong)
    SellCondition = (EMAShort CROSSES UNDER EMALong)
    
    IF (TIME > 133000  AND TIME < 233000) OR Volume > 1000 then
    
    IF  BuyCondition THEN
    DRAWTEXT( "▲", barindex, lowest[1](low), Dialog, bold, 20) COLOURED (0, 0, 255, 255)
    DRAWTEXT( "▲", barindex, lowest[1](low) - 10, Dialog, bold, 20) COLOURED (0, 0, 255, 150)
    DRAWTEXT( "B", barindex, low - range, Dialog, bold, 15) COLOURED (0, 0, 255, 255)
    ENDIF
    
    IF SellCondition THEN
    DRAWTEXT( "▼", barindex, highest[1](high) + 30, Dialog, bold, 20) COLOURED (255, 0, 0, 150)
    DRAWTEXT( "▼", barindex, highest[1](high) + 20, Dialog, bold, 20) COLOURED (255, 0, 0, 255)
    DRAWTEXT("S", barindex, highest[10](high) + range, Dialog, bold, 15) COLOURED (255, 0, 0, 255)
    
    ENDIF
    
    RETURN EMAShort COLOURED (0, 0, 255,150) AS "EMA Short", EMALong COLOURED (255, 0, 0, 150) AS "EMA Long"
    robertogozzi and Razz thanked this post
    #138075 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    ENDIF is missing at line 21.

    What’s the value for n and m?

    Albert Kader thanked this post
    #138128 quote
    Albert KaderAlbert Kader
    Participant
    New
    EMAShort =  ExponentialAverage[2](close)
    EMALong = ExponentialAverage[9](close)
    
    BuyCondition = (EMAShort CROSSES OVER EMALong)
    SellCondition = (EMAShort CROSSES UNDER EMALong)
    
    IF (TIME > 133000  AND TIME < 233000) OR Volume > 1000 then
    
     IF  BuyCondition THEN
      DRAWTEXT( "▲", barindex, lowest[1](low), Dialog, bold, 20) COLOURED (0, 0, 255, 255)
      DRAWTEXT( "▲", barindex, lowest[1](low) - 10, Dialog, bold, 20) COLOURED (0, 0, 255, 150)
      DRAWTEXT( "B", barindex, low - range, Dialog, bold, 15) COLOURED (0, 0, 255, 255)
     ENDIF
    
     IF SellCondition THEN
      DRAWTEXT( "▼", barindex, highest[1](high) + 30, Dialog, bold, 20) COLOURED (255, 0, 0, 150)
      DRAWTEXT( "▼", barindex, highest[1](high) + 20, Dialog, bold, 20) COLOURED (255, 0, 0, 255)
      DRAWTEXT("S", barindex, highest[10](high) + range, Dialog, bold, 15) COLOURED (255, 0, 0, 255)
     ENDIF
    ENDIF
    
    RETURN EMAShort COLOURED (0, 0, 255,150) AS "EMA Short", EMALong COLOURED (255, 0, 0, 150) AS "EMA Long"
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Simple Market hours EMA Arrow and Text Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Albert Kader @azenkwed Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Albert KaderAlbert Kader
6 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/01/2020
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...