Join useThinkScript to post your question to a community of 21,000+ developers and traders.
My AsGood Indicators work well for meCan someone share me with a day trading strategy that has worked for them. I have tried many strategies and used many indicators but ended up losing trades or the strategy didn't work good enough backtesting.
You should find all that have been posted within this site.Thank you, I would like to test this indicators
Can someone share me with a day trading strategy that has worked for them. I have tried many strategies and used many indicators but ended up losing trades or the strategy didn't work good enough backtesting.
# Beznas Day Trading Strategy
# Only works in intraday charts
# http://tos.mx/!YkA7WlXW
declare hide_on_daily;
declare once_per_bar;
def S = if GetAggregationPeriod() <= AggregationPeriod.FIVE_MIN then yes else no;
def vClose = close;
def vHigh = high;
def vLow = Low;
#----------
def BN = BarNumber();
def NaN = Double.NaN;
def RTS = RegularTradingStart(GetYYYYMMDD());
def RTE = RegularTradingEnd(GetYYYYMMDD());
def RTH = GetTime() >= RTS and GetTime() <= RTE;
def LD = if RTH and !RTH[1] then vLow
else if RTH and vLow < LD[1] then vLow
else LD[1];
#def LD_BN = if LD==vLow and RTH then BN else NaN;
def LD_BN = if LD == vLow then BN else NaN;
def LD_H = if LD == vLow then vHigh else LD_H[1];
# ===================== BUY ===================
plot Buy_Line = if BN >= HighestAll(LD_BN)
then HighestAll(if IsNaN(vClose[-1])
then LD_H
else NaN) else NaN;
Buy_Line.SetPaintingStrategy(PaintingStrategy.LINE);
Buy_Line.SetLineWeight(3);
Buy_Line.SetDefaultColor(Color.UPTICK);
def upBar = if vClose crosses above Buy_Line and RTH then BN else upBar[1];
plot Buy = if BN == HighestAll(upBar) and S then vLow - (2 * TickSize()) else NaN;
Buy.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
Buy.SetLineWeight(5);
Buy.SetDefaultColor(Color.GREEN);
# ===================== SELL ===================
def HD = if RTH and !RTH[1] then vHigh else if RTH and vHigh > HD[1] then vHigh else HD[1];
def HD_BN = if vHigh == HD and RTH then BN else NaN;
def HD_L = if vHigh == HD then vLow else HD_L[1];
plot Sell_Line = if BN >= HighestAll(HD_BN) and S #ADDED AND S
then HighestAll(if IsNaN(vClose[-1])
then HD_L else NaN) else NaN;
Sell_Line.SetPaintingStrategy(PaintingStrategy.LINE);
Sell_Line.SetLineWeight(3);
Sell_Line.SetDefaultColor(Color.DOWNTICK);
def dnBar = if vClose crosses beLow Sell_Line then BN else dnBar[1];
plot Sell = if BN == HighestAll(dnBar) and S then vHigh + (2 * TickSize()) else NaN;
Sell.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
Sell.SetLineWeight(5);
Sell.SetDefaultColor(Color.RED);
#-- Labels
input Labels = yes;
#AddLabel(Labels and !IsNaN(Buy_Line) and !IsNaN(Sell_Line), " Day trade: " + Round(Buy_Line, rnd) + " | " + Round(Sell_Line, rnd), Color.LIGHT_GRAY);
AddLabel(S and Labels and !IsNaN(Buy_Line), "DT> " + Round(Buy_Line), Color.LIGHT_GRAY);
AddLabel(S and Labels and !IsNaN(Sell_Line), "DT< " + Round(Sell_Line), Color.LIGHT_GRAY);
#-- Bubbles
input Bubbles = no;
AddChartBubble(Bubbles and Buy, Buy_Line, "> " + Round(Buy_Line), Buy_Line.TakeValueColor(), no);
AddChartBubble(Bubbles and Sell, Sell_Line, "< " + Round(Sell_Line), Sell_Line.TakeValueColor(), yes);
#-- Alerts
input Alerts = {default "RTH", "YES", "NO"};
Alert(Alerts and (vClose crosses above Buy_Line), GETSYMBOL() + " DT BUY", Alert.BAR, Sound.Ding);
Alert(Alerts and (vClose crosses beLow Buy_Line), GETSYMBOL() + " DT CANCEL BUY", Alert.BAR, Sound.Bell);
Alert(Alerts and (vClose crosses beLow Sell_Line), GETSYMBOL() + " DT SELL", Alert.BAR, Sound.Bell);
Alert(Alerts and (vClose crosses above Sell_Line), GETSYMBOL() + " DT CANCEL SELL", Alert.BAR, Sound.Bell);
mod note:
Not Updated In Real Time!
This script uses the HIGHESTALL function which has been depreciated by Schwab.
Because of its excess use of resources; it is no longer updated in real time.
# Beznas Day Trading Strategy
# Only works in intraday charts
# http://tos.mx/!YkA7WlXW
declare hide_on_daily;
declare once_per_bar;
def S = if GetAggregationPeriod() <= AggregationPeriod.FIVE_MIN then yes else no;
def vClose = close;
def vHigh = high;
def vLow = Low;
#----------
def BN = BarNumber();
def NaN = Double.NaN;
def RTS = RegularTradingStart(GetYYYYMMDD());
def RTE = RegularTradingEnd(GetYYYYMMDD());
def RTH = GetTime() >= RTS and GetTime() <= RTE;
def LD = if RTH and !RTH[1] then vLow
else if RTH and vLow < LD[1] then vLow
else LD[1];
#def LD_BN = if LD==vLow and RTH then BN else NaN;
def LD_BN = if LD == vLow then BN else NaN;
def LD_H = if LD == vLow then vHigh else LD_H[1];
# ===================== BUY ===================
plot Buy_Line = if BN >= HighestAll(LD_BN)
then HighestAll(if IsNaN(vClose[-1])
then LD_H
else NaN) else NaN;
Buy_Line.SetPaintingStrategy(PaintingStrategy.LINE);
Buy_Line.SetLineWeight(3);
Buy_Line.SetDefaultColor(Color.UPTICK);
def upBar = if vClose crosses above Buy_Line and RTH then BN else upBar[1];
plot Buy = if BN == HighestAll(upBar) and S then vLow - (2 * TickSize()) else NaN;
Buy.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
Buy.SetLineWeight(5);
Buy.SetDefaultColor(Color.GREEN);
# ===================== SELL ===================
def HD = if RTH and !RTH[1] then vHigh else if RTH and vHigh > HD[1] then vHigh else HD[1];
def HD_BN = if vHigh == HD and RTH then BN else NaN;
def HD_L = if vHigh == HD then vLow else HD_L[1];
plot Sell_Line = if BN >= HighestAll(HD_BN) and S #ADDED AND S
then HighestAll(if IsNaN(vClose[-1])
then HD_L else NaN) else NaN;
Sell_Line.SetPaintingStrategy(PaintingStrategy.LINE);
Sell_Line.SetLineWeight(3);
Sell_Line.SetDefaultColor(Color.DOWNTICK);
def dnBar = if vClose crosses beLow Sell_Line then BN else dnBar[1];
plot Sell = if BN == HighestAll(dnBar) and S then vHigh + (2 * TickSize()) else NaN;
Sell.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
Sell.SetLineWeight(5);
Sell.SetDefaultColor(Color.RED);
#-- Labels
input Labels = yes;
#AddLabel(Labels and !IsNaN(Buy_Line) and !IsNaN(Sell_Line), " Day trade: " + Round(Buy_Line, rnd) + " | " + Round(Sell_Line, rnd), Color.LIGHT_GRAY);
AddLabel(S and Labels and !IsNaN(Buy_Line), "DT> " + Round(Buy_Line), Color.LIGHT_GRAY);
AddLabel(S and Labels and !IsNaN(Sell_Line), "DT< " + Round(Sell_Line), Color.LIGHT_GRAY);
#-- Bubbles
input Bubbles = no;
AddChartBubble(Bubbles and Buy, Buy_Line, "> " + Round(Buy_Line), Buy_Line.TakeValueColor(), no);
AddChartBubble(Bubbles and Sell, Sell_Line, "< " + Round(Sell_Line), Sell_Line.TakeValueColor(), yes);
#-- Alerts
input Alerts = {default "RTH", "YES", "NO"};
Alert(Alerts and (vClose crosses above Buy_Line), GETSYMBOL() + " DT BUY", Alert.BAR, Sound.Ding);
Alert(Alerts and (vClose crosses beLow Buy_Line), GETSYMBOL() + " DT CANCEL BUY", Alert.BAR, Sound.Bell);
Alert(Alerts and (vClose crosses beLow Sell_Line), GETSYMBOL() + " DT SELL", Alert.BAR, Sound.Bell);
Alert(Alerts and (vClose crosses above Sell_Line), GETSYMBOL() + " DT CANCEL SELL", Alert.BAR, Sound.Bell);
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
V | Best time frame for day trading? | Questions | 5 | |
K | Identifying Best Stocks/Scanner/Gapups for Day Trading | Questions | 6 | |
M | Best Daytrading Strategies For SPY | Questions | 3 | |
S | What is the best way to identify the choppy price action? | Questions | 1 | |
![]() |
Best editing tool in ThinkOrSwim | Questions | 1 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.