repo32

Open Close Daily Line

This will place circles on your chart for the opening daily price. If price is above, the circles are green. If price is below, the circles are red. I wanted to be able to see the opening price a bit easier while in smaller time frames.
I decided to add the previous daily closing line to the original script. Basically looking for good support / resistance
نص برمجي مفتوح المصدر

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

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

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

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
// Written by Robert N.  030615
// Still looking for way to remove from previous days
study("Open/Close Daily Line", overlay=true)

odl = input(true, title="Open Daily Line")
dopen = security(tickerid, 'D', open) 
dcolor = close < dopen ? red : green
plot(odl and dopen ? dopen :na , title="Daily_Open",style=circles, color=dcolor, linewidth=3) 


cdl = input(true, title="Previous Closing Daily Line")
dclose = security(tickerid, 'D', close[1]) 
dcolor2 = close < dclose ? red : green
plot(cdl and dclose ? dclose :na , title="Daily_Close",style=circles, color=dcolor2, linewidth=3)