 ShareGenius Swing Trading (SST)  
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/

// source/reference: https://swingtradingsheets.blogspot.com/?view=classic

// atulkharadi

//@version=4
study(title="Modified DC for SST", shorttitle="GTT Price Table", overlay=true)

length = input(20, minval=1)
profit = input(10, minval=1)
HIGH20 = highest(length)
LOW20 = lowest(length)
TARGET = HIGH20*(100+profit)/100

plot(HIGH20,"HIGH20", color = color.blue)
plot(LOW20,"LOW20", color = color.red)
plot(TARGET,"TARGET", color = color.green)

var table gttTable = table.new(position.top_right, 5, 5, bgcolor=color.white, frame_color=color.white, frame_width=2, border_width=2)
SST="TODAY SST\n" + "PRICE"
table.cell(gttTable, 0, 0, text=SST, bgcolor=color.silver, text_color=color.white)
if barstate.islast
    High20D="20D HIGH\n" + tostring(round(HIGH20,2))
    table.cell(gttTable, 1, 0, text=High20D, bgcolor=color.blue, text_color=color.white)
    Low20D="20D LOW\n" + tostring(round(LOW20,2))
    table.cell(gttTable, 2, 0, text=Low20D, bgcolor=color.red, text_color=color.white)
    TargetPrice="TARGET\n" + tostring(round(TARGET,2))
    table.cell(gttTable, 3, 0, text=TargetPrice, bgcolor=color.green, text_color=color.white)

////////////End of Code
