♥ 0 |
Hello, I’ve seen some code on here for both one and two green heiken ashi candles. I was wondering how I can change this to scan for either one or two red candles?
Similarly with the TTM Trend. I have the code for indicating up or down for two changed bars, but how about for just one bar?
Marked as spam
|
Private answer
After requesting links to the sources referenced in the question we can provide a solution. The original code for the two green HA candles is located here: https://www.hahn-tech.com/ans/two-consecutive-green-heikin-ashi-candles/ All we need to do is change the greater than sign to a lesser than sign in the third to the last line of code. Here is the original:
And to make this look for two consecutive red candles we change it to this:
The next question was how to change it from two consecutive bars to only one. Here is second to last line of code (the one that determines two consecutive candles):
And here is how you modify this to include only one bar instead of two:
For the second portion of this request we have the following link: https://www.hahn-tech.com/thinkorswim-scan-ttm-trend/ The request was to modify the scan from that video so that it only counts the first bar to change color. Here are the two lines of code to modify:
And here they are after the modification to only count one bar instead of two:
Marked as spam
|
Please log in to post questions.