Cool and the indicator is not recommended for below 5min chart what time chart do you have this on?
Cool and the indicator is not recommended for below 5min chart what time chart do you have this on?
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thanks could I see your chart?@Zlotko I use a 30 min bar.
Here is how @Svanoy has the 30min chart setup:Thanks could I see your chart?
How would I add a ding sound (Sound.DING) when either the "Sell @" or "Buy @" chart bubbles are added?
AddChartBubble(close[n] crosses below ST[n], low[n+1] + TickSize() * n, "Sell @ " + low[n1], color.Cyan, yes); AddChartBubble(close[n] crosses above ST[n], high[n+1] - TickSize() * n, "Buy @ " + high[n1], color.Yellow, no);
Thank you,
Code:input alerts = yes; Alert(alerts and close[n] crosses below ST[n], "SELL", Alert.BAR, Sound.Ding); Alert(alerts and close[n] crosses above ST[n], "BUY", Alert.BAR, Sound.Ding);
Would like to see this tooIs it possible to change the chart bubbles to arrows instead?
Is it possible to change the chart bubbles to arrows instead?
https://usethinkscript.com/threads/supertrend-indicator-by-mobius-for-thinkorswim.7/#post-54027Would like to see this too
the above code produce the following error:You can try this template I use for my studies, pieced it together and modified it from here and there, most from linus' SuperCombo. Basically, just plug in what triggers your buy and sell signals (and stops if you use them) and it will put a bar on top with your overall p/l for the given timeframe. This isn't a strategy so a report isn't given, but it does give a quick p/l so you can change settings and instantly see the effect. Note, this won't account for any fees or commissions, so if doing futures, have to take off the fees per order.
Code:input showSignals = yes; input showLabels = yes; input showBubbles = yes; input useStops = no; ############################################ ## Create Signals - FILL IN THIS SECTION ############################################ def BuySignal ; # insert condition to create long position def SellSignal ; # insert condition to create short position def BuyStop = if !useStops then 0 else 0 ; # insert condition to stop in place of the 0 after else def SellStop = if !useStops then 0 else 0 ; # insert condition to stop in place of the 0 after else ####################################### ## Maintain the position of trades ####################################### def CurrentPosition; # holds whether flat = 0 long = 1 short = -1 if (BarNumber()==1) OR isNaN(CurrentPosition[1]) { CurrentPosition = 0; }else{ if CurrentPosition[1] == 0 { # FLAT if (BuySignal) { CurrentPosition = 1; } else if (SellSignal){ CurrentPosition = -1; } else { CurrentPosition = CurrentPosition[1]; } } else if CurrentPosition[1] == 1 { # LONG if (SellSignal){ CurrentPosition = -1; } else if (BuyStop){ CurrentPosition = 0; } else { CurrentPosition = CurrentPosition[1]; } } else if CurrentPosition[1] == -1 { # SHORT if (BuySignal){ CurrentPosition = 1; } else if (SellStop){ CurrentPosition = 0; } else { CurrentPosition = CurrentPosition[1]; } } else { CurrentPosition = CurrentPosition[1]; } } def isLong = if CurrentPosition == 1 then 1 else 0; def isShort = if CurrentPosition == -1 then 1 else 0; def isFlat = if CurrentPosition == 0 then 1 else 0; ####################################### ## Plot the Signals ####################################### Plot BuySig = if (!isLong[1] and BuySignal and showSignals) then 1 else 0; BuySig.AssignValueColor(color.yellow); BuySig.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); BuySig.SetLineWeight(3); Plot SellSig = if (!isShort[1] and SellSignal and showSignals) then 1 else 0; SellSig.AssignValueColor(color.white); SellSig.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); SellSig.SetLineWeight(3); Plot BuyStpSig = if (BuyStop and isLong[1] and showSignals) then 1 else 0; BuyStpSig.AssignValueColor(color.gray); BuyStpSig.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); BuyStpSig.SetLineWeight(3); Plot SellStpSig = if (SellStop and isShort[1] and showSignals) then 1 else 0; SellStpSig.AssignValueColor(color.gray); SellStpSig.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); SellStpSig.SetLineWeight(3); ####################################### ## Orders ####################################### def isOrder = if CurrentPosition == CurrentPosition[1] then 0 else 1; # Status changed so it's a new order def orderPrice = if (isOrder and (BuySignal or SellSignal)) then open[-1] else orderPrice[1]; ####################################### ## Price and Profit ####################################### def profitLoss; if (!isOrder){ profitLoss = 0; } else if ((isOrder and isLong[1]) and (SellSig or BuyStpSig)){ profitLoss = close - orderPrice[1]; } else if ((isOrder and isShort[1]) and (BuySig or SellStpSig)) { profitLoss = orderPrice[1] - close; } else { profitLoss = 0; } def profitLossSum = compoundValue(1, if isNaN(isOrder) then 0 else if isOrder then profitLossSum[1] + profitLoss else profitLossSum[1], 0); def profitWinners = compoundValue(1, if isNaN(isOrder) then 0 else if isOrder and profitLoss > 0 then profitWinners[1] + 1 else profitWinners[1], 0); def profitLosers = compoundValue(1, if isNaN(isOrder) then 0 else if isOrder and profitLoss < 0 then profitLosers[1] + 1 else profitLosers[1], 0); def profitPush = compoundValue(1, if isNaN(isOrder) then 0 else if isOrder and profitLoss == 0 then profitPush[1] + 1 else profitPush[1], 0); def TradePL = If isLong then Round(((close - orderprice)/TickSize())*TickValue()) else if isShort then Round(((orderPrice - close)/TickSize())*TickValue()) else 0; # current trade p/l def dollarProfitLoss = round((profitLoss/Ticksize())*Tickvalue()); # per trade for chart bubbles def biggestWin = compoundValue(1, if isNaN(isOrder) then 0 else if isOrder and (dollarProfitLoss > 0) and (dollarProfitLoss > biggestWin[1]) then dollarProfitLoss else biggestWin[1], 0); def biggestLoss = compoundValue(1, if isNaN(isOrder) then 0 else if isOrder and (dollarProfitLoss < 0) and (dollarProfitLoss < biggestLoss[1]) then dollarProfitLoss else biggestLoss[1], 0); def orderCount = (profitWinners+profitLosers+profitPush); def PCTWin = round((profitWinners/orderCount)*100,2); ####################################### ## Create Labels ####################################### AddLabel(yes, GetSymbol()+" Tick Size: "+TickSize()+" Value: "+TickValue(), color.white); AddLabel(showSignals and showLabels, "Orders: " + orderCount + " P/L: " + AsDollars(profitLossSum), if profitLossSum > 0 then Color.GREEN else if profitLossSum < 0 then Color.RED else Color.GRAY); AddLabel(yes, "Winners: "+ PCTWin +"%",if PCTWin > 50 then color.green else if PCTWin > 40 then color.yellow else color.gray); AddLabel(yes, "MaxUp: "+ AsDollars(biggestWin) +" MaxDown: "+AsDollars(biggestLoss), color.white); AddLabel(if !IsNan(CurrentPosition) then 1 else 0, "Current: "+ (If isLong then "Bought" else "Sold") + " @ "+orderPrice, color.white); AddLabel(if !IsNan(orderPrice) then 1 else 0, "Trade P/L: "+ AsDollars(TradePL), if (TradePL > 0) then color.green else if (TradePl < 0) then color.red else color.gray); ####################################### ## Chart Bubbles for Profit/Loss ####################################### AddChartBubble(showSignals and showBubbles and isOrder and isLong[1], low, "$"+dollarProfitLoss, if dollarProfitLoss == 0 then Color.LIGHT_GRAY else if dollarProfitLoss > 0 then Color.GREEN else color.Red, 1); AddChartBubble(showSignals and showBubbles and isOrder and isShort[1], high, "$"+dollarProfitLoss, if dollarProfitLoss == 0 then Color.LIGHT_GRAY else if dollarProfitLoss > 0 then Color.GREEN else color.Red, 0);
The directions state:the above code produce the following error:
Value never assigned to BuySignal at 13:5
Value never assigned to SellSignal at 20:5
I have this supertrend indicator long time ago and it worked very well for me, I got it from here and I think it was posted by Mobius. It has the pivots, resistance and support lines and it can work for any time frame.http://tos.mx/wf3aXRa here you go
Can anybody teach me how to use this Super Trend WatchList? I thought it is for scan. But it cannot be saved because there is no plot. I cannot find a way to make a watchList based on above code.
I tried to add the script but can't figure it out... I want it to just show new signals green color for UP or BUY, and red color for DOWN or sell.. could you modified the script please? I'm going to use it for my watchlist column...
Thanks so much for this indicator. Can I change the code to remove the color lines following along the bars or change the color of these lines.?
hello everyone, a quick question, can someone here can add a buy and sell orders strategy to back test this system? just a basic buy order and sell order with the signal. thank you in advanceVersion 3. http://tos.mx/i5TMVJb
meaning for the mobius super trend V3hello everyone, a quick question, can someone here can add a buy and sell orders strategy to back test this system? just a basic buy order and sell order with the signal. thank you in advance
https://usethinkscript.com/threads/supertrend-indicator-by-mobius-for-thinkorswim.7/#post-4647hello everyone, a quick question, can someone here can add a buy and sell orders strategy to back test this system? just a basic buy order and sell order with the signal. thank you in advance
meaning for the mobius super trend V3
can you share a link to this scanner?
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
Archived: Supertrend Indicator by Mobius for ThinkorSwim | Indicators | 312 | ||
SuperTrend and RSI Laguerre Indicator for ThinkorSwim | Indicators | 35 | ||
S | Smart Supertrend For ThinkOrSwim | Indicators | 13 | |
M | SuperTrend Oscillator [LUX] For ThinkOrSwim | Indicators | 7 | |
B | SuperTrend TradingView Look-A-Like For ThinkOrSwim | Indicators | 64 |
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.