База:
цифра 5 обозначает количество свечей взятых в базу, ее можно менять (Agrigation 1m):
Plot base = Highest(high, 5) — lowest (low, 5);
База на максимуме или минимуме
(Agrigation D):
High-low — plot Diff = (close-high[1])*100>= (high — high[1] — 0.08)*100 or (low[1] — close)*100 >= (low[1] — low -0.08)*100 or close >= high or close >= high; AssignBackgroundColor( if close >= high then Color.Green else if close <= low then Color.RED else Color.BLACK);
Уровни на подобии фигур технического анализа таких как «треугольник» и «чашка с ручкой»:
plot hi = (highest(high,120)[5]+0.01)- close <=0.05 and (highest(high,120)[5]+0.01) >=highest (high, 6) or close — (lowest(low, 120)[5]-0.01) <=0.05 and (lowest(low, 120)[5]-0.01) <=lowest (low,6); AssignBackgroundColor (if (highest(high,120)[5]+0.01)- close <=0.02 and (highest(high,120)[5]+0.01) >=highest (high, 6) then color.GREEN else if close — (lowest(low, 120)[5]-0.01) <=0.02 and (lowest(low, 120)[5]-0.01) <=lowest (low,6) then color.RED else color.BLACK);
по материалам:
http://study-of-trading.ru/amatar/2013/10/26/sbornik-formul-dlya-thinkorswim-tos-chast-3.html