buildingbetter
New member
Hello all and thank you in advance for your help. I have run into an issue with secondary periods in thinkscript while trying to code an alert. I contacted the help center at TOS and they basically threw up their hands and told me to come here. I am trying to create an alert that notifies me when a 1M bar crosses the DAILY SMA50.
Eventually, I would like to be alerted on crosses or touches of Daily SMA's on a watchlist of stocks so that I can take advantage of a rejection off of these levels or a break and successful backtest of these levels. I've searched through the forums to find other issues with the secondary period but am hoping that there is some workaround to this problem. Again, I very much appreciate any help anyone can provide.
Code:
close("period" = AggregationPeriod.MIN, "priceType" = PriceType.MARK) crosses Daily_SMA()."sma50"
Error:
Secondary period not allowed: 1 min.
Eventually, I would like to be alerted on crosses or touches of Daily SMA's on a watchlist of stocks so that I can take advantage of a rejection off of these levels or a break and successful backtest of these levels. I've searched through the forums to find other issues with the secondary period but am hoping that there is some workaround to this problem. Again, I very much appreciate any help anyone can provide.
Code:
close("period" = AggregationPeriod.MIN, "priceType" = PriceType.MARK) crosses Daily_SMA()."sma50"
Error:
Secondary period not allowed: 1 min.