jeanbotelho
New member
Hello guys. I'd like some help with my indicator.
I just create lines to show corrections from the bottom to the top and vice-versa in a specific time frame.
I would like to create an option through which I could set date and time (only intraday, if possible) for this indicator to work.
For example: I'd like to setup an option for the indicator start plotting today, at 4:00AM.
Could anyone help me?
This is the script that I have.
I'd like to add an option for plotting only starting at a specific date and time or only today.
Thank you.
### Trend Tracker
### Created by Jean Botelho
### Inspired in the Rastreador de Tendência by Leo Nonato and Wagner Belzonte UAI
## Inputs
input TimeFrame = AggregationPeriod.DAY;
input length = 22;
input priceH = FundamentalType.HIGH;
input priceL = FundamentalType.LOW;
#input displace = 0;
### Definitions
def priceHigh = highest(Fundamental(priceH, period = timeframe), length);
def priceLow = lowest(Fundamental(PriceL, period= timeframe), length);
def range = priceHigh - priceLow;
def Line90 = priceLow + (0.9 * range);
def Line80 = priceLow + (0.8 * range);
def Line70 = priceLow + (0.7 * range);
def Line30 = priceLow + (0.3 * range);
def Line20 = priceLow + (0.2 * range);
def Line10 = priceLow + (0.1 * range);
#### Plots
#plot intervalo = range;
#intervalo.setstyle(curve.SHORT_DASH);
plot Line901 = Line90;
Line901.SetStyle(Curve.SHORT_DASH);
plot Line801 = Line80;
Line801.SetStyle(Curve.MEDIUM_DASH);
plot Line701 = Line70;
Line701.SetStyle(Curve.SHORT_DASH);
plot Line301 = Line30;
Line301.SetStyle(Curve.SHORT_DASH);
plot Line201 = Line20;
Line201.SetStyle(Curve.SHORT_DASH);
plot Line101 = Line10;
Line101.SetStyle(Curve.SHORT_DASH);
##### Colors
Line901.SetDefaultColor(Color.WHITE);
Line801.SetDefaultColor(Color.VIOLET);
Line701.SetDefaultColor(Color.DARK_GREEN);
Line301.SetDefaultColor(Color.DARK_GREEN);
Line201.SetDefaultColor(Color.VIOLET);
Line101.SetDefaultColor(Color.WHITE);
### END
I know it's going to be easy for you guys. But I'm just starting.
Thank you, one more time.
I just create lines to show corrections from the bottom to the top and vice-versa in a specific time frame.
I would like to create an option through which I could set date and time (only intraday, if possible) for this indicator to work.
For example: I'd like to setup an option for the indicator start plotting today, at 4:00AM.
Could anyone help me?
This is the script that I have.
I'd like to add an option for plotting only starting at a specific date and time or only today.
Thank you.
### Trend Tracker
### Created by Jean Botelho
### Inspired in the Rastreador de Tendência by Leo Nonato and Wagner Belzonte UAI
## Inputs
input TimeFrame = AggregationPeriod.DAY;
input length = 22;
input priceH = FundamentalType.HIGH;
input priceL = FundamentalType.LOW;
#input displace = 0;
### Definitions
def priceHigh = highest(Fundamental(priceH, period = timeframe), length);
def priceLow = lowest(Fundamental(PriceL, period= timeframe), length);
def range = priceHigh - priceLow;
def Line90 = priceLow + (0.9 * range);
def Line80 = priceLow + (0.8 * range);
def Line70 = priceLow + (0.7 * range);
def Line30 = priceLow + (0.3 * range);
def Line20 = priceLow + (0.2 * range);
def Line10 = priceLow + (0.1 * range);
#### Plots
#plot intervalo = range;
#intervalo.setstyle(curve.SHORT_DASH);
plot Line901 = Line90;
Line901.SetStyle(Curve.SHORT_DASH);
plot Line801 = Line80;
Line801.SetStyle(Curve.MEDIUM_DASH);
plot Line701 = Line70;
Line701.SetStyle(Curve.SHORT_DASH);
plot Line301 = Line30;
Line301.SetStyle(Curve.SHORT_DASH);
plot Line201 = Line20;
Line201.SetStyle(Curve.SHORT_DASH);
plot Line101 = Line10;
Line101.SetStyle(Curve.SHORT_DASH);
##### Colors
Line901.SetDefaultColor(Color.WHITE);
Line801.SetDefaultColor(Color.VIOLET);
Line701.SetDefaultColor(Color.DARK_GREEN);
Line301.SetDefaultColor(Color.DARK_GREEN);
Line201.SetDefaultColor(Color.VIOLET);
Line101.SetDefaultColor(Color.WHITE);
### END
I know it's going to be easy for you guys. But I'm just starting.
Thank you, one more time.