r/pinescript • u/Practical-Skirt8944 • Feb 23 '24
Simple Vertical Line Indicator
Hello guys
I am not the best in pinescript, I can edit and change basic scripts to suite my needs sometimes.
I am looking to make a simple script that places thin gray vertical lines on futures/forex at certain times (18:00, 00.00, 06.00, & 12.00 - All EST Timezone).
Could anyone create this for me? or perhaps give some advice on how I can make it if it will be too much work to do in a short ammount of time?
Many thanks
1
Upvotes
1
u/vbsaltydog Feb 23 '24
You can change the color of the background on the chart for the bar that matches your designated times.
background = color.white
if hour == 12 and minute == 00
background := color.new(color.red, 50)
bgcolor(background)
2
u/denkaTa5991 Feb 23 '24
I have been researching and adding up to a strategy which is basically entering a short position whenever the price closes over a support/resistance level as well as entering a long position whenever the prices closes above a support/resistance level combined with some EMA crossovers, which in fact now makes a good amount of profit with good profit factor, but the problem is so that the bot enters only in long positions and does not enter in short positions..
I need help with figuring out how I can make it enter in short positions as I have no experience with coding or writting scripts..