♥ 0 |
Hi Pete, Thanks for all the great resources. I am new to thinkscript and have been working on a EMA cross strategy in TOS that I have pieced together from several different resources online. Below is the entire script: input tradeSize = 100; def signal = MovAvgExponential(“length” = 22).”AvgExp” crosses above MovAvgExponential(“length” = 40).”AvgExp” def exit = MovAvgExponential(“length” = 22).”AvgExp” crosses below MovAvgExponential(“length” = 40).”AvgExp”; addOrder(orderType.SELL_TO_CLOSE, exit, open[-100], tradeSize, color.MAGENTA, color.MAGENTA); It’s not too long, so I included it with altered values for context. The section I’m not fully understanding and would really appreciate if you could translate for me what the code is doing is this part: and MovAvgExponential(“length” = 30).”AvgExp” is less than close(“period” = AggregationPeriod.MONTH); If you could help me translate what this code is actually doing on the chart it would really help my understanding with this strategy and learning thinkscript. Thanks so much
Marked as spam
|
Please log in to post questions.