Madrid

Madrid Upper OHLC

485
This study displays the candlesticks of the upper timeframe, this provides a glance of the bigger picture in the current time frame by quickly and easily identifying the main OHLC levels.
In this example I am using the indicator twice on the 15 min chart, the first implementation displays the candles of the Daily timeframe and the second displays those of the weekly.

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
// Hector R. Madrid :04/DEC/2014 : 16:45 : 1.0
// http://madridjourneyonws.blogspot.com/
// This study displays the candlesticks of the upper timeframe, this
// provides a view of the bigger picture in the current time frame.
// Ref.  Pine programming tutorial 
//

study("Madrid Upper OHLC", "MUpperOHLC", overlay=true)

highTimeFrame = input("D", type=resolution)
numBars = highTimeFrame

// Upper HLOC
upperHigh = security(tickerid, highTimeFrame, high)
upperLow = security(tickerid, highTimeFrame, low)
upperOpen = security(tickerid, highTimeFrame, open)
upperClose = security(tickerid, highTimeFrame, close)
newBar(res) => change(time(res)) != 0



// Output
upperH = plot(newBar(numBars)?upperHigh:upperHigh[1], style=circles, linewidth=1, color=orange)
upperL = plot(newBar(numBars)?upperLow:upperLow[1], style=circles, linewidth=1, color=orange)
upperO = plot(newBar(numBars)?upperOpen:upperOpen[1], style=circles, linewidth=1, color=red)
upperC = plot(newBar(numBars)?upperClose:upperClose[1], style=circles, linewidth=1, color=green)

fill(upperH, upperL, orange, transp=90)
fill(upperO,upperC, color=orange, transp=90)