♥ 0 |
Hello, I’m trying to set up alerts in Thinkorswim when a 30 minute candle CLOSES either at or above the upper weighted bollinger band or at or below the lower weighted bollinger band. The scripts that I keep trying to use are giving me several false signals while the current candle is still active. I’m looking for just getting the alert when the 30 min candle officially closes and is either above or below the corresponding bollinger band. Any ideas how I can fix this? Here’s the ThinkScript I am using currently. I’m new to this, so I made it in the condition wizard: close(“period” = AggregationPeriod.THIRTY_MIN, “priceType” = PriceType.LAST) is greater than or equal to reference BollingerBands(“average type” = “WEIGHTED”).”UpperBand”
Marked as spam
|
Private answer
Go Packers! Thanks for providing your code. That helps me understand where are you at. Your solution if very close. Only two items are out of place. You are setting the time frame in the wrong location. The other mistake is that you are not offsetting the condition by one bar. To understand how to configure this for you, I merely reviewed our video titled: Thinkorswim AutoTrade Almost. Your code should look like this:
Notice there is no reference to a time frame. That is because the time frame is set at a higher level. I have attached two screenshots to clarify this. The first screenshot shows how the condition is setup. Notice the “Offset:” property is set to +1 for each side. This is what tells the code to look at the previous bar for the signal and not the current bar. The second screenshot shows how to set the condition to the 30 min time frame. Marked as spam
|
|
Private answer
Fantastic. I just tested this today and it worked for me. I really appreciate the help. I’m wondering if you could help me take this one step further. I watched your video titled Thinkorswim Autotrade Almost and saw in there that you were able to code an alert for bollinger bands AND rsi. I’d like to use that same concept, but with bollinger bands and the Hull MA. Here’s what I’m looking to accomplish: Send an alert when the close of a 30min candle crosses above the upper bollinger band AND the 125 period Hull MA is trending lower. I will then look to set up another alert when the close crosses below the lower band AND the 125 period Hull MA is trending higher. I hope that makes sense. The question I have is how do I put in the condition wizard for the Hull MA part of this system? Thanks again! Marked as spam
|
|
Private answer
In response to additional question asked by Disher on March 8th, 2018. Attached screenshot shows how to setup the condition for the Hull moving average in decline. Also included is the code that is generated:
Marked as spam
|
Please log in to post questions.
When responding, please use the comment section of the previous answer rather than entering a new answer. (like this one) That keeps things orderly, because people are able to vote on answers and this can cause them to display out of order. Comments will always stay in order with the answer to which they are applied.