TradingVIew quantitative programming language PineScript online video teaching courseware (teaching plan for the second lesson)

one. Teaching objectives:
1. Knowledge objectives
Execution mode, time series
2. The use and difference of ability target
SMA and EMA
How to draw candles and colors on the chart: plotcandle(), barcolor()
II. Key points and difficulties in teaching Key points and
difficulties: writing MACD indicators, plotcandle() drawing candle charts, line function
3. Teaching process
1, time series
2, execution mode, concept of historical columns, real-time columns, references to historical columns
3, plotcandle() , the use of barcolor()

plotcandle(open, high, low, close, title, color, wickcolor, editable, show_last, bordercolor, display) → void

example

//@version=5
indicator("Example 2")
paletteColor = close >= open ? color.lime : color.red
plotbar(open, high, low, close, color = paletteColor)
barcolor(color, offset, editable, show_last, title) → void

example

//@version=5
indicator("barcolor example", overlay = true)
isUp = close > open
isDown = close <= open
isOutsideUp = high > high[1] and low < low[1] and isUp
isOutsideDown = high > high[1] and low < low[1] and isDown
isInside = high < high[1] and low > low[1]
barcolor(isInside ? color.yellow : isOutsideUp ? color.aqua : isOutsideDown ? color.purple : na)

4. The difference and application of EMA and SMA

5. Homework

Supongo que te gusta

Origin blog.csdn.net/weixin_40641289/article/details/125017774
Recomendado
Clasificación