Registered User Joined: 12/27/2013 Posts: 152
|
I saw them but I was not sure of how to separate them into indicator line formula amd channel width formula.Please check the setting below if it is correct:
-Period: 1
- Width Multiplier: 1
- Indicator Line Formula: (9 * AVGC9.1 + O) / 10
- Channel Width Formula: 3 * SQR(ABS(O ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 - 10 * ((9 * AVGC9.1 + O) / 10) ^ 2) / 10)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Yes, the formulas for your Custom PCF Channel Indicator are correct.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
some of my alerts are firing 15min later.How do i rectify it?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Is it just specific alerts or does it seem to be all of them?
Keep in mind for example that the second two formulas in the Monday, April 13, 2015 1:57:43 PM ET post were specifically re-written to wait 1 bar as compared to the same formulas in the Friday, April 10, 2015 10:16:42 AM post.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
Not all of them.To be specific, it happens with this;
O > (9 * AVGC9.1 + O) / 10 + 3 * SQR(ABS(O ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 - 10 * ((9 * AVGC9.1 + O) / 10) ^ 2) / 10)
on a 30min time frame, it gave alert at 11:15:02
The formula was posted:Tuesday, June 02, 2015 11:38:08 AM
and the one I edited from it for bollinger band 6,3
O< (5*AVGC5.1 + O)/6 - 3*SQR(ABS(O^2 + C1 ^ 2 +C2 ^ 2 +C3 ^ 2 +C4 ^ 2 + C5 ^2 - 6*((5*AVGC5.1 +O)/6)^2)/6)
gave alert at 1:45.01 for a 30min time frame
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
In looking at the service in your profile it appears you have FreeStockCharts.com Premium and Alerts, but no real time data services active.
This means you would have Forex and BATS data streaming in real time. All of the data from the other exchanges is integrated into the feed on a fifteen minute delayed basis however. So the open can change when that data is integrated into the feed if the first trade of the bar didn't happen on the BATS exchange.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
does that also affect forex instruments like GBP/JPY?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It should not affect Forex as the Forex data should stream in RT even with no RT service set up in the profile.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
my money flow index indicator is not showing any plot.It only shows 3 horizontal loines.How do i rectify it?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The green and red lines are just plotted at 20 and 80 as guides, but the yellow line is the indicator itself.
If the yellow line is just a flat line on the bottom of the chart, it is probably a symbol for which we do not carry volume. The Money Flow Index will be zero if there is no volume.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
thanks bruce
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
QUOTE (Bruce_L)
I can make a formula which returns the value at which this would have triggered, but it could not be used as a condition and wouldn't make an alert return this value.
The following formula assumes price broke the upper Bollinger Band at the upper Bollinger Band or that price broke the upper Bollinger Band at the lower Bollinger Band. It returns this value even if price gapped through the Bollinger Bands. It adds both values together if both the upper and lower Bollinger Bands were broken during the same bar.
ABS((ABS(H1 - AVGC12.1) + ABS(L1 - AVGC12.1) + ABS(ABS(H1 - AVGC12.1) - ABS(L1 - AVGC12.1))) / 2 < 3 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 - 12 * AVGC12.1 ^ 2) / 12)) * (ABS(H >= AVGC12 + 3 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 - 12 * AVGC12 ^ 2) / 12)) * (AVGC12 + 3 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 - 12 * AVGC12 ^ 2) / 12)) + ABS(L <= AVGC12 - 3 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 - 12 * AVGC12 ^ 2) / 12)) * (AVGC12 - 3 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 - 12 * AVGC12 ^ 2) / 12)))
please edit the above formula for the:
(a) bollinger band (12,(3,3))
(b) bollinger band (12,(3,4))
(c) bollinger band (12,(3,5))
(d) bollinger band (20,2)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I have no idea what the settings listed in a, b and c are supposed to represent. The (3,3), (3,4) and (3,5) bits for the second parameter are what do not make sense to me.
I think d can be written as follows.
ABS((ABS(H1 - AVGC20.1) + ABS(L1 - AVGC20.1) + ABS(ABS(H1 - AVGC20.1) - ABS(L1 - AVGC20.1))) / 2 < 2 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 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 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 20)))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
why are those second parameters not making sense to you? I used them to determine the level of risk
to take in my trading.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I have no idea what they are supposed to represent. A Bollinger Band has a period setting and a width setting as numeric parameters. It does not have a third numeric parameter.
I have no idea what a Bollinger Band 12,3,5 even is. The 5 parameter may represent some level of risk to take in your trading, but it is completely meaningless to me.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
(a) bollinger band (12,(3,3)) means a period of 12 and 3,3 standard deviations
(b) bollinger band (12,(3,4)) means a period of 12 and 3,4 standard deviations
(c) bollinger band (12,(3,5)) means a period of 12 and 3,5 standard deviations
I hope that clarifies my request
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
Is it possible that you mean 3.3, 3.4 and 3.5 standard deviations?
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
yes.I mean exactly that.In germany, decimals are represented my commas.And also in http://www.freestockcharts.com/platform/premium, the "Std dev", is presented in the same form when editing the bollinger band.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
TC2000 version 12 is not fully compatible with using the , as the decimal marker. If you use the , as the decimal marker it will work on the charts in Custom Indicators and when testing the formula, but will not work for WatchList Columns and EasyScan Conditions.
You would need to use the . as the decimal marker in order for the formula to work correctly as a WatchList Column or EasyScan even though you have the , set as the decimal marker on your computer.
I have attempted to write the following formulas without using decimal markers to hopefully avoid the issue. The formula for a can be written this way as follows.
ABS((ABS(H1 - AVGC12.1) + ABS(L1 - AVGC12.1) + ABS(ABS(H1 - AVGC12.1) - ABS(L1 - AVGC12.1))) / 2 < 33 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^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+ C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 - 12 * AVGC12 ^ 2) / 12) / 10) * (AVGC12 + 35 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 - 12 * AVGC12 ^ 2) / 12) / 10) + ABS(L <= AVGC12 - 35 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 - 12 * AVGC12 ^ 2) / 12) / 10) * (AVGC12 - 35 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 - 12 * AVGC12 ^ 2) / 12) / 10))
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
Do you how I can re-set the decimal marker on my computer? I am using windows 7 Home edition
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You might want to check out the information on the following Microsoft webpage where section 4 talks about the Numbers tab.
http://windows.microsoft.com/is-is/windows/change-dates-times-currency-measurements-display#1TC=windows-7
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
thank you.
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
please write a formula for me that gives alert when the
(a) the price is above the upper bollinger band (20,2) and rsi(14)<Moving average(5)
(b) the price is below the lower bollinger band (20,2) and rsi(14)>Moving average(5)
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
[QUOTE=email2norman]
please write a formula for me that gives alert when the
the price is above the upper bollinger band (20,2) and rsi(14)<Moving average(5)
the price is below the lower bollinger band (20,2) and rsi(14)>Moving average(5)
I have changed the decimal marker of my computer to .
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I really can't create a Condition Formula for this which is short and fast enough enough to be practical and post in the forums if you are using the Wilder's smoothed version of RSI. If you are using the plain RSI without Wilder's smoothing however then a can be written as follows.
C > AVGC20 + 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 20) AND RSI14 < RSI14.5
And b can be written as follows.
C < AVGC20 - 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 20) AND RSI14 > RSI14.5
You can compare the 14-period Wilder's smoothed version of RSI to its 5-period moving average by adding the indicators to the chart. This will allow you to click on one of them and select Create Scan Condition to create the condition.
Create Conditions from Your Chart (5:25)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
thank you.
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
the (b) formula is sending alert when the price is inside the bollinger band.Please check what is wrong.
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
How do I make a back-testing to show the number of times a condition was met over a period of time? is that possible with the service I am using?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (email2norman) the (b) formula is sending alert when the price is inside the bollinger band.Please check what is wrong.
Is it still returning the wrong results?
QUOTE (email2norman) How do I make a back-testing to show the number of times a condition was met over a period of time? is that possible with the service I am using?
If you can settle for the percentage of the time a condition is true instead of a count, just use a Custom PCF % True Indicator with the Period set to the number of bars of interest and the Average Type set to Simple.
If you actually need a count, you can use a Custom PCF Indicator instead. You will still set the Period to the number of bars of interest and the Average Type to Simple, but you will need to put the Condition Formula inside of an ABS() function and multiply it by the period.
So for example, to count the number of bars C > C1 over the most recent 25 bars, you would use the following Custom PCF Indicator.
- Period: 25
- Average Type: Simple
- Formula: 25 * ABS(C > C1)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
The formula (b) is now ok.
Both the Custom PCF % True and custom PCF indicator are not returning any value.They only show some line of 3 dots on the watchlist column.I use several values for the periods but the result is the same.
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
For example, i use the following setting for the custom PCF indicator:
- Period: 24000
- Average Type: Simple
-formula: 24000 * ABS(C < AVGC20 - 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 - 20 * AVGC20 ^ 2) / 20) AND RSI14 > RSI14.5)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There is only 500 bars of data available in each time frame at the beginning of each trading day. While new bars are added throughout the trading day, it is never going to get out to 24000 bars. Even a 1-minute time frame is going to have a maximum of 890 bars in it at the end of the trading day.
So the largest period you are going to be able to reasonably use with this particular formula is going to be about 480. This is because the formula itself requires at least 20 bars to calculate.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
I wanted to check the count over a period of I year.Is there a way I can do that?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You could set the period to 252 on a daily chart, but there isn't going to be enough data available for intraday time frames.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
(a) At the end of a period a bar closes above the upper bollinger band (20,2) and rsi14< Moving Average(5) at the instant of close;please write a formula that will give alert at the instant of that bar closure.
(b) At the end of a period a bar closes below the lower bollinger band (20,2) and rsi14> Moving Average(5) at the instant of close; write a formula that will give alert at the instant of that bar closure.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The 1 bar ago version of a which will not trigger until the next bar starts forming can be written as follows.
C1 > AVGC20.1 + 2 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 - 20 * AVGC20.1 ^ 2) / 20) AND RSI14.1.1 < RSI14.5.1
The 1 bar ago version of b which will not trigger until the next bar starts forming can be written as follows.
C1 < AVGC20.1 - 2 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 - 20 * AVGC20.1 ^ 2) / 20) AND RSI14.1.1 > RSI14.5.1
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
I mean the alert should trigger exactly at the completion of bar C1.I am making the request because I want to enter trade at the opening price of the next bar,
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There isn't a way to make it so a Condition Formula waits until the bar closes and then returns true or not.
You can make a Condition Formula which will return true at any point during the bar as long as the requirements are true at the time (so it could be true or not true at different points during the bar). This will make it so check marks will appear and disappear over the course of the bar for the same symbol. This type of condition will no longer be checked when the next bar starts forming.
Or you can make a Condition Formula which will return true during the following bar. Since it is looking at the previous bar, it will return true or not for the entire duration of the bar. It can't start returning true until the next bar starts forming however because it doesn't become 1 bar ago until that happens.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/27/2013 Posts: 152
|
The problem i am having with the alert is that it usually comes late(well into the next bar).Can you add some code to (a) and (b) so that the alert will trigger at the instance the next bar opens?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There isn't anything I can add to the code to make it trigger earler.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |