Hello @MerryDay @halcyonguy @BenTen @SleepyZ or any others, wondering if any of you can help me with a script with the following rules:
Assuming bull bar is green and bear bar is red (only for RTH).
For bull bars:
1. The highest bull bar should be blue. Starting at 9:30am est, first bull bar will be blue. When a new higher high bull bar forms, that must be blue and the previous blue bull bar with a lower high must be put back to green.
2. Top most bull bar will be blue, any bull bar to the left of the top most bull bar will be green. Any bull bars to the right of the top most bull bar with a lower high must also be blue, provided there is no higher high bull bar to its right.
Similarly with bear bars:
1. First bear bar of the day (RTH) starts with purple. Lowest bear bar is to remain purple, with previous bear bars turning back to red where the current bear bar has made a lower low.
2. Higher low bear bars to the left will remain red while the higher low bear bars to the right will remain purple.
3. When a higher high bear bar forms, all purple bear bars to the right with a lower low of it must turn back to red.
The idea is that the blue bars act as resistance and the purple bars act as support.
I hope the logic as I have explained is not contradicting or flawed!
Thank you again very much for what you do here in this forum! Its a great inspiration!!
-kktrades
PS: Apologies, I feel like that I could have explained this in simple terms. Put simply:
Current bull bar always ends blue. If its a higher high compared to the previous blue bar, the previous blue bar becomes green, else remains blue.
Current bear bar always ends purple and if its a lower high compared to the previous purple bar, that previous purple bar becomes red, else remains purple.
Assuming bull bar is green and bear bar is red (only for RTH).
For bull bars:
1. The highest bull bar should be blue. Starting at 9:30am est, first bull bar will be blue. When a new higher high bull bar forms, that must be blue and the previous blue bull bar with a lower high must be put back to green.
2. Top most bull bar will be blue, any bull bar to the left of the top most bull bar will be green. Any bull bars to the right of the top most bull bar with a lower high must also be blue, provided there is no higher high bull bar to its right.
Similarly with bear bars:
1. First bear bar of the day (RTH) starts with purple. Lowest bear bar is to remain purple, with previous bear bars turning back to red where the current bear bar has made a lower low.
2. Higher low bear bars to the left will remain red while the higher low bear bars to the right will remain purple.
3. When a higher high bear bar forms, all purple bear bars to the right with a lower low of it must turn back to red.
The idea is that the blue bars act as resistance and the purple bars act as support.
I hope the logic as I have explained is not contradicting or flawed!
Thank you again very much for what you do here in this forum! Its a great inspiration!!
-kktrades
PS: Apologies, I feel like that I could have explained this in simple terms. Put simply:
Current bull bar always ends blue. If its a higher high compared to the previous blue bar, the previous blue bar becomes green, else remains blue.
Current bear bar always ends purple and if its a lower high compared to the previous purple bar, that previous purple bar becomes red, else remains purple.
Last edited: