Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/7/2004 Posts: 16
|
In SF4 how can I write a rule for ADX declining or equal to yesterday? ADX is a rounded indicator so it is not uncommon for it to be exactly equal to yesterday. The rule writing menu in SF4 doesnt allow for identifying when an indicator is equal to yesterday from what I can see. The end result would be to create one rule for when ADX is rising (easy, already done) indicating a trending market, and another rule for when ADX is equal to OR decling from yesterday's value indicating a trading-range market.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
One option would be to create a RealCode Rule based on the ADX Rising Rule you already have. Drag and drop into the Code tab of the RealCode Editor to create something similar to the first line of the following RealCode Rule:
'# SC = condition.ScanCondition
If SC.Value = False Then Pass
Another option would be to create RealCode Rule based directly on ADX by dragging and dropping it into the Code tab of the RealCode Editor ot create something similar to the first line of the following RealCode Rule:
'# AL = indicator.ADXLine.2
If AL.Value <= AL.Value(1) Then Pass
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 16
|
I tried both and came up empty - not a real code expert. Could you clarify a bit?
|
|
Registered User Joined: 10/7/2004 Posts: 16
|
OK, I got it, Bruce! After looking at the second option again and playing around, I got it! Thanks for the help!
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome. I am happy to read you figured it out.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |