Registered User Joined: 5/5/2015 Posts: 20
|
The price is currently below the 13 period moving average.
I want to set an alert for when price moves above the 13 period moving average.
I click on the moving average listed above the price chart.
I see options in the expanded sublist: Moving Average 13 vs Price History.
Question: What is the difference between the options
1. Below Price History, and
2. Crossing Down Price History ?
Does one of the options wait for the bar to complete or close above the moving average?
thank you
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Below Price History returns true as long as the moving average is below the current price.
Crossing Down Price History only returns true if the moving average is below the current price but was above the current price during the previous bar.
Neither condition waits for the bar to close. Both conditions can return true part way through the formation of the current bar only to have the condition stop returning true by the time the bar finishes forming.
You would need to create a condition for the previous bar instead of the current bar in order to way for the bar to close. Note that this is really waiting for the next bar to start forming. so the last bar of the trading day could not return true until the open the next morning (assuming you aren't displaying pre and post market data).
You can add a 1 period moving average with the offset setting set to 1 to get the close of the previous bar plotted on the chart as a current value.
You can set the offset of the moving average from 0 to 1 to get its previous value.
You would then be able to check for the offset moving averages crossing to create a condition which waits until the next bar starts forming to return true.
You can delete the 1 period offset moving average and reset the offset of the other moving average after creating the condition.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|