Indicator – Visual Heikin with signal for alert

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #120921 quote
    leofi
    Participant
    Junior

    Visual Heikin

    “Candle heikin-ashi green = Background green =  Signal Bullish”

    “Candle heikin-ashi red = Background red =  Signal Bearish”

    • The indicator returns a signal for the bullish signal and for the bearish signal,  so you can easily create an alert to warn you. LvL Alert is always at 1, the signal bearish or bullish is at 0 and will become 1 if there is a signal.
    • Disable and enable background color
    • Custom background color alpha
    • Show on price or below price

    Enjoy 💙

    //-+------------------------------------------------------------------+-//
    // | Name: Visual Heikin                                              | //
    // | Description: Draw background heiken ashi                         | //
    // | Author: Tom's - Leofi                                            | //
    // | Last update: 02.03.20                                            | //
    //-+------------------------------------------------------------------+-//
    
    //-+------------------------------------------------------------------+-//
    // | Variable Setup                                                   | //
    //-+------------------------------------------------------------------+-//
    
    //-> Custom color alpha for background
    alphaColor = 75
    
    //-> Draw backround
    drawBackground = 1
    
    //-+------------------------------------------------------------------+-//
    // | Heikin Ashi                                                      | //
    //-+------------------------------------------------------------------+-//
    
    IF (BarIndex = 0) THEN
     c = totalPrice
     o = (open + close) / 2
    ELSE
     c = totalPrice
     o = (o[1] + c[1]) / 2
    ENDIF
    
    //-+------------------------------------------------------------------+-//
    // | Logic                                                            | //
    //-+------------------------------------------------------------------+-//
    
    IF (c > o) THEN
     //-> Variable for alert signal
     signalBullish = 1
     signalBearish = 0
     //-> Draw red background color if enabled
     IF (drawBackground) THEN
      backgroundColor(0, 200, 0, alphaColor)
     ENDIF
    ELSE
     //-> Variable for alert signal
     signalBullish = 0
     signalBearish = 1
     //-> Draw green background color if enabled
     IF (drawBackground) THEN
      backgroundColor(200, 0, 0, alphaColor)
     ENDIF
    ENDIF
    
    //-> Return signal bullish and bearish
    RETURN signalBearish coloured(233, 0, 0) style(histogram) AS "Signal BEARISH", signalBullish coloured(0, 233, 0) style(histogram) AS "Signal BULLISH", 1 AS "LvL Alert"

     

    #121026 quote
    Nicolas
    Keymaster
    Master

    Thanks for sharing @leofi

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

Indicator – Visual Heikin with signal for alert


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
leofi @leofi Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
5 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/02/2020
Status: Active
Attachments: No files
Logo Logo
Loading...