Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/6/2014 Posts: 34
|
Hi,
I found a thread which provided a %True indicator of 10 day low that I want to use.
C < C9 AND C < C8 AND C < C7 AND C < C6 AND C < C5 AND C < C4 AND C < C3 AND C < C2 AND C < C1
How would I use realcode to program that indicator?
Thank you
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following RealCode Condition.
If Price.Close < Price.MinClose(9, 1) Then Pass
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/6/2014 Posts: 34
|
Thank you so much Burce, that worked perfectly.
|
|
Registered User Joined: 10/6/2014 Posts: 34
|
Hi bruce,
I applied the condition. is the Price.MinClose(9,1) looking forward or back? I'd like to create the condition that looking forward 10 days, it is the low of closing prices.
Thank you.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Price.MinClose(9, 1) is the lowest close of the nine bars ending one bar ago. I would describe it as looking back, but comparing it to the current close as is done in my original response matches the Condition Formula given in your original post.
That said, I'm not quite sure what you are asking when you ask if it is looking forward or back.
It is not generally recommend that you look into the future when creating indicators or conditions. If you use such a thing for backtesting, the backtest ends up being psychic in that it knows what is going to happen before it happens.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/6/2014 Posts: 34
|
Hi bruce,
I'd like to find the 10 day low looking forward, as in if the closing price of a bar is still the the lowest 10 bars from now. I'm mainly using it just as a support point indicator for me to see on the graph, not to backtest. And also use the 10 day high as a pressure point. Is there a way to find the 10 day low looking forward in that sense?
Thank you very much.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I don't know if it "makes sense", but:
If Price.Close < Price.MinClose(9, -9) Then Pass
Something similar for the highest close would be:
If Price.Close > Price.MaxClose(9, -9) Then Pass
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/6/2014 Posts: 34
|
great, thanks Bruce.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |