Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/31/2011 Posts: 4
|
I'm new to writing scripts. I want to set an alert so that when a 5 min candle closes within x percent of the daily 20 Period Moving average (simple). I'm assuming I would need to write a scan condition. But am unsure of how to differentiate the time frames.
|
|
Registered User Joined: 10/31/2011 Posts: 4
|
I tried setting an alert for GMCR 'Price Daily below Avg 20' and it alerted me incorrectly. The AVG 20 is 83.35, price today has not been below 84.04. Also got an error when I set an alert for 'Price Daily XDOWN Avg 20' which also alerted at the incorrect price. I'm trying to get TC2000 to alert me when the price is at the 20 period Daily moving Average.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It is not possible to mix time frames within a single Personal Criteria Formula or condition. When you create or edit a formula in TC2000 version 12.3, there will be a Time Frame drop-down menu to set the time frame, but the time frame will apply to the entire formula.
You can create a Daily Condition Formula for price being within 5% of the daily 20-period simple moving average of price (this would mean that the close of the current 5-minute bars meets this requirement as well):
ABS(C / AVGC20 - 1) <= .05
But it is not possible to create a Condition Formula for the close of a particular 5-minute candle is within 5% of the daily 20-period simple moving average.
PCF Formula Descriptions
Handy PCF example formulas to help you learn the syntax of PCFs!
You can use an existing Condition Formula as the basis of an Alert for the current symbol by select More | Alerts | New Alert | Condition Alert and then selecting that condition from the Condition drop-down menu.
Setting Alerts in TC2000
Managing Alerts in the Alert Console
If you need to scan an entire WatchList for the condition however, you will need to use an EasyScan or Sort instead of an Alert.
Building a Scan with Multiple Conditions
Sorting with Chart Conditions
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (BeastieBoy) I tried setting an alert for GMCR 'Price Daily below Avg 20' and it alerted me incorrectly. The AVG 20 is 83.35, price today has not been below 84.04. Also got an error when I set an alert for 'Price Daily XDOWN Avg 20' which also alerted at the incorrect price. I'm trying to get TC2000 to alert me when the price is at the 20 period Daily moving Average.
Please contact technical support.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/31/2011 Posts: 4
|
Thanks, Bruce. I don't understand where I would need to put this in order to monitor/alert me. You said it would be a 'Daily Condition Formula'. I also don't understand why it would work intraday, as I thought that 'C' in the formula refers to 'Close', in this case of the Day's price. Would this work intraday?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
C refers to closing price if the bar is closed or the current price if the bar has not yet closed. Using a daily time frame for this works to identify if the current intraday bar meets the requirements because the current price of the current daily bar and the current price of the current intraday bar are exactly the same.
You can create a Condition Formula by selecting New | Condition Formula. Once you have saved the condition, you can use it as an Alert by following the directions given in my previous response. Select More | Alerts | New Alert | Condition Alert and then select the saved condition from the Condition drop-down menu. The two links mentioning alerts in my previous response are to videos demonstrating how to create and monitor alerts in more detail.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |