Bollinger and Stochastic chart strategy


Category:
0
1

I am trying to create a conditional order based off this

https://usethinkscript.com/threads/bollinger-bands-and-stochastic-scalping-indicator-for-thinkorswim.6/

—–

input tradeSize = 100;

def signal = close is less than or equal to BollingerBands().”LowerBand” and RSI().”RSI” is less than or equal to 70 within 12 bars and StochasticFull(“d period” = 6, “slowing period” = 6).”FullK” is less than or equal to StochasticFull(“d period” = 6, “slowing period” = 6).”FullK” and MoneyFlowIndex(“length” = 12);

addOrder(OrderType.BUY_TO_OPEN, signal, open[-1], tradeSize, Color.CYAN, Color.CYAN);

—–

When i do the above nothing shows on my back testing

Marked as spam
Posted by (Questions: 2, Answers: 3)
Asked on August 8, 2020 12:03 pm
252 views
0
Private answer

The simplest solution.... add a sell order. All you have there is a buy order. If you don't have any sell orders what you have there is a buy and hold strategy. Add some exit rules.

This NOT a Conditional Order. What you have there is a chart strategy. So I have updated the title of your question to reflect that.

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on August 8, 2020 2:06 pm
0
thank you and i added the sell order and it appears to now show in the chart strategy but when i go to put in the actual order it says: At least one plot should be defined
( at August 8, 2020 2:44 pm)
0
i got it to work - final question so as one order complete and buys and sell do i have to manually do it again for the next order. So effectively everytime it completes recopy and paste since ToS doesnt have auto trading
( at August 8, 2020 2:58 pm)
0
Every last detail on this topic is explained in the following video: https://www.hahn-tech.com/thinkorswim-autotrade-almost/ If you have already viewed this video, you should view it again because your question is answered in that video. If you have not viewed that video yet.... you are going to kick yourself for trying to do this without it.
( at August 8, 2020 4:24 pm)