0% found this document useful (0 votes)
104 views1 page

Top Bottom Script

This document contains a TradingView Pine Script that identifies buy and sell signals based on the crossover of bottom and top periods defined by user inputs. It plots buy and sell labels on the chart and changes the background color based on the relationship between the top and bottom values. Alerts are also set up to notify users of buy and sell signals.

Uploaded by

Creater Studio
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)
104 views1 page

Top Bottom Script

This document contains a TradingView Pine Script that identifies buy and sell signals based on the crossover of bottom and top periods defined by user inputs. It plots buy and sell labels on the chart and changes the background color based on the relationship between the top and bottom values. Alerts are also set up to notify users of buy and sell signals.

Uploaded by

Creater Studio
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/ 1

//@version=4

// This source code is subject to the terms of the Mozilla Public License 2.0 at
https://mozilla.org/MPL/2.0/
// © ceyhun

study("Top Bottom ", overlay=true)

per = input(14, title="Bottom Period")


loc = low < lowest(low[1], per) and low <= lowest(low[per], per)
bottom = barssince(loc)

per2 = input(14, title="Top Period")


loc2 = high > highest(high[1], per2) and high >= highest(high[per2], per2)
top = barssince(loc2)

/////BUY-SELL/////
Buy = crossover(bottom, top)
Sell = crossunder(bottom, top)

plotshape(Buy,"BUY", shape.labelup, location.belowbar, color.green,


text="BUY",textcolor=color.black)
plotshape(Sell,"SELL", shape.labeldown, location.abovebar, color.red,
text="SELL",textcolor=color.black)

background = top < bottom ? color.new(#0000FF,85) : top > bottom ?


color.new(#FF0000,85) : na
bgcolor(color=background)

alertcondition(Buy, title="Buy Signal", message="Buy")


alertcondition(Sell, title="Sell Signal", message="Sell")

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy