0% found this document useful (0 votes)
55 views2 pages

10 Gibi 11 Gibi

Uploaded by

future7gg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views2 pages

10 Gibi 11 Gibi

Uploaded by

future7gg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.

0
at https://mozilla.org/MPL/2.0/

//@version=5
//@author=yashgode9

import AxelPoley/signalLib_norepaint/1 as signalLib

indicator('buysellsignal-yashgode9', 'buysellsignal-yashgode9', overlay=true,


format=format.price, max_labels_count=200, max_lines_count=50)

//--------------------- Prerequisites of script ---------------------//

Depth = input.int(150, 'Depth', minval=1, step=1, group="signalLib Config")


Deviation = input.int(120, 'Deviation', minval=1, step=1, group="signalLib Config")
Backstep = input.int(100, 'Backstep', minval=2, step=1, group="signalLib Config")
labels = input.int(0, "Labels Transparency", group="Labels")
buycolor = input.color(color.new(#03ff85, 0), 'Buy-Color', group="Colors")
sellcolor = input.color(color.new(#fc0808, 0), 'Sell-Color', group="Colors")
buycolor1 = color.black
sellcolor1 = color.black
lines = 0
labelsize = switch input.int(3, "Label size", minval=1, maxval=5, group="Labels")
1 => size.tiny
2 => size.small
3 => size.normal
4 => size.large
5 => size.huge
repaint = false
extend = extend.none

//--------------------- Main Logic of Script ---------------------//

[direction, zee1, zee2] = signalLib.signalLib(low, high, Depth, Deviation,


Backstep)

string nowPoint = ""


var float lastPoint = nz(zee1.price[1], 0.0)
if ta.change(direction)
lastPoint := zee1.price[1]

line zeezee = na
label point = na

// Define signal change condition


signalChange = direction != direction[1]
var string SignalAlert = na

if repaint
nowPoint := direction < 0 ? "Buy-point" : "Sell-point"
point := label.new(zee2.time, zee2.price, nowPoint, xloc=xloc.bar_time,
yloc=yloc.price,color=color.new(direction < 0 ? buycolor : sellcolor,
labels),style=direction > 0 ? label.style_label_down :
label.style_label_up,textcolor=color.new(direction > 0 ? buycolor1 : sellcolor1,
labels), size=labelsize)
if direction == direction[1]
line.delete(zeezee[1])
label.delete(point[1])
else
line.set_extend(zeezee[1], extend)
else
if signalChange
nowPoint := direction[1] < 0 ? "Buy-point" : "Sell-point"
point := label.new(zee2.time[1], zee2.price[1], nowPoint,
xloc=xloc.bar_time, yloc=yloc.price,color=color.new(direction[1] < 0 ? buycolor :
sellcolor, labels),style=direction[1] > 0 ? label.style_label_down :
label.style_label_up,textcolor=color.new(direction[1] > 0 ? buycolor1 : sellcolor1,
labels), size=labelsize)

// Set SignalAlert variable


SignalAlert := direction[1] < 0 ? "Buy" : "Sell"

// Trigger alert
alert("Signal Alert: " + SignalAlert + " signal generated at " +
syminfo.ticker + " price: " + str.tostring(zee2.price[1]),
alert.freq_once_per_bar_close)

//========================================================================== The
End Of Drama
=========================================================================//

You might also like