3/2/2024 0 Comments Thinkorswim buy sell indicator![]() ![]() UpSignal.SetHiding(!showBreakoutSignals) ĭownSignal.SetHiding(!showBreakoutSignals) ĭiff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM) ĭiff.DefineColor("Positive and Up", Color.GREEN) ĭiff.DefineColor("Positive and Down", Color.DARK_GREEN) ĭiff.DefineColor("Negative and Down", Color.RED) ĭiff.DefineColor("Negative and Up", Color.DARK_RED) ĭiff.AssignValueColor(if Diff >= 0 then if Diff > Diff then lor("Positive and Up") else lor("Positive and Down") else if Diff < Diff then lor("Negative and Down") else lor("Negative and Up")) ĭef AvgSMA = SimpleMovingAvg(Diff, lengthema) ĪddOrder(OrderType.BUY_AUTO, bull, close, tradeSize, Color.ORANGE, Color.ORANGE, "MACD SMA buy " + close) ĪddOrder(OrderType.SELL_AUTO, bear, close, tradeSize, Color.ORANGE, Color.ORANGE, "MACD SMA sell " + close) STUDY Plot DownSignal = if Diff crosses below 0 then 0 else Double.NaN Plot UpSignal = if Diff crosses above 0 then 0 else Double.NaN Plot Diff = MACD(fastLength, slowLength, MACDLength, averageType).Diff Input averageType = AverageType.EXPONENTIAL
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |