| Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 2/5/2013 Posts: 4
|
Hello,
Will it be possible to build the following scan on 1 Hour, Heiken Ashi candles:
If the HA price closes above 5 MA and the bottom of the HA candle is flat (no wick) and the previous candle was not flat (or different color), it qualifies to go long. Similarly if the HA price closes below 5 MA and the top of the HA candle is flat (no wick) and the previous candle was not flat (or different color), it qualifies to go short.
Please let me know ASAP, and also if you have any code to perform this so I can sign up.
Thanks
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (taimoormkhan) If the HA price closes above 5 MA and the bottom of the HA candle is flat (no wick) and the previous candle was not flat (or different color), it qualifies to go long.
You would need TC2000 Platinum to create Conditions based on intraday candles, but with that in mind, you could use the following Condition Formula set to a 60-Minute Time Frame:
O + H + L + C > AVGO5 + AVGH5 + AVGL5 + AVGC5 AND L >= (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 AND L1 < (XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) / 4
QUOTE (taimoormkhan) Similarly if the HA price closes below 5 MA and the top of the HA candle is flat (no wick) and the previous candle was not flat (or different color), it qualifies to go short.
O + H + L + C < AVGO5 + AVGH5 + AVGL5 + AVGC5 AND H <= (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 AND H1 > (XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) / 4
HEIKEN-ASHI in TC2000 V12
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 2/5/2013 Posts: 4
|
Thanks Bruce - I signed for the platinum and the code you provided works like a charm.
Now two questions:
1. I need to merge these both conditions for long and short in a single scan i.e
a) O + H + L + C > AVGO5 + AVGH5 + AVGL5 + AVGC5 AND L >= (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 AND L1 < (XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) / 4
b) O + H + L + C < AVGO5 + AVGH5 + AVGL5 + AVGC5 AND H <= (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 AND H1 > (XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) / 4
2. I need the capability for this condition to only run stocks identified in my watchlist.
Please advise - and yes you guys have a great thing going !
|
|
Registered User Joined: 2/5/2013 Posts: 4
|
The above was my trial account - not sure why it is still posting under that - my platinum account is Scats
Thanks
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You can put the Condition Formulas in parentheses and then connect them with OR to return true if either of the component conditions are true:
(O + H + L + C > AVGO5 + AVGH5 + AVGL5 + AVGC5 AND L >= (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 AND L1 < (XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) / 4) OR (O + H + L + C < AVGO5 + AVGH5 + AVGL5 + AVGC5 AND H <= (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 AND H1 > (XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) / 4)
You can use the Condition Formula as an EasyScan Condition with the desired WatchList as the WatchList to Scan and add other EasyScan Conditions to the same EasyScan if necessary.
Building a Scan with Multiple Conditions
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
|
Guest-1 |