Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 5/15/2012 Posts: 7
|
Good Morning,
I have the code to program a custom indicator into TC2000.
What I'm trying to do is plot historical pivots on any chart so I can go back in time and base my base trading decisions on them.
It's kind of like plotting swing point highs and lows, and is based on the following logic;
PIVOT HIGH
inputs: Price( High ), LeftStrength( 3 ), RightStrength( 3 ) ;
if PivotHighVSBar( 1, Price, LeftStrength, RightStrength, RightStrength + 1 ) <> -1
then
begin
Plot1[RightStrength]( High[RightStrength], "PivotHi" ) ;
Alert ;
end
else
NoPlot( 1 ) ; { remove the marker }
PIVOT LOW
inputs: Price( Low ), LeftStrength( 3 ), RightStrength( 3 ) ;
if PivotLowVSBar( 1, Price, LeftStrength, RightStrength, RightStrength + 1 ) <> -1
then
begin
Plot1[RightStrength]( Low[RightStrength], "PivotLo" ) ;
Alert ;
end
else
NoPlot( 1 ) ; { remove the marker }
Thank you for taking the time to consider my request. Hopefully this can be translated into something useful.
John
|
|
Registered User Joined: 5/15/2012 Posts: 7
|
Hello Fellow Traders,
I guess what I'm asking is how to convert a TradeStation custom indicator into something TC2000 understands. From what I've been researching from previous posts, the task could be difficult.
Is this something worth persuing?
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
We can use a Custom PCF Indicator to plot the Swing High where it is detected.
- Plot Style: Dots
- Plot Color: Up to you.
- Period: 1
- Average Type: Doesn't matter (because the Period is 1).
- Formula: H3 * ABS(MAXH3 < H3 AND H3 > MAXH3.4)
And another Custom PCF Indicator to plot the Swing Low where it is detected:
- Plot Style: Dots
- Plot Color: Up to you.
- Period: 1
- Average Type: Doesn't matter (because the Period is 1).
- Formula: L3 * ABS(MINL3 > L3 AND L3 < MINL3.4)
These indicators should be plotted in the same pane and scale and Price History.
Adding and Moving Indicators
Adding a 1-Period Simple Moving Average to these Custom PCF Indicators allows you to plot the indicators at the Swing High and Swing Low instead of at where they were identified. You just need to set the Offset of the moving average indicators to -3, the Plot Style of the Custom PCF Indicator to Dots and drag the Opacity setting of the Custom PCF Indicators upon which the moving averages are based all the way to the left (making the Custom PCF Indicators invisible).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 5/15/2012 Posts: 7
|
Hi Bruce,
Thanks for getting back to me on this.
Actually a few days ago I found something very similar from a previous post on plotting swing points, and it's been working quite well.
Here's the formula I found for a swing point low for example;
L3 * ABS(L3 <= MINL3.4 AND L3 <= MINL3)
I actually added the = sign because I found the original formula wasn't giving me enough plots.
I must say the formula you're presenting here seems to be much cleaner and more accurate.
Thanks for your awesome work, we all appreciate it here.
John
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're wecome. Except for equality, the results should be the same between the formula for a swing low in my post and the formula for a swing low in your post. The same terms are used, they are just in a different order.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 3/16/2012 Posts: 57
|
Hi Bruce,
I have copied your custom PCF inidcator for the swing high and swing low into my system and it looks great. I was wondering how many days past the swing high or low before the indicator is actually plotted as it obviously needs to wait for at least one candle after the actual high or low to confirm the swing point. As most inidcators are lagging, I just want to be clear as to how much this one lags.
Thanks, Peter
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The MINL3 and MAXH3 portions of the formulas mean the swing low and swing high cannot be identified until 3 bars after the swing low or swing high.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 3/16/2012 Posts: 57
|
Thanks. Anyway to adjust this so the swing high or swing low is detected after the following candle? Lets say that we leave the parameters for before the swing high or low the same, but adjust the after swing high or lwo parameters so that the only candle that needs to satisfy the requirements is the first one after the swing high or low. I know this is less reliable, but may assist in catching the beginning of the next uptrend combined w/ other indicators.
Thanks-Peter
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
We can change the swing high formula to:
H1 * ABS(H < H1 AND H1 > MAXH3.2)
And the swing low formula to:
L1 * ABS(L > L1 AND L1 < MINL3.2)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Gold Customer
Joined: 3/16/2012 Posts: 57
|
I will try this out. Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |