You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I am trying to build an indicator that shows a line next to the price that indicates last X Bars High.
The only caviat is, that i want to show the maximum of the current and the last. In another words, only show the current Last X Bars Max if is higher compared to the Last X Bars Max. Else just print the last one.
For example in the screenshot ( https://imgur.com/a/rRWPUwp ), the line should remain equal because the high is never broken.
If i add the commented lines, the indicator just prints a straight line(Screenshot - https://imgur.com/a/J73p33N). For my understanding the logic is correct. Can someone help me?