Formula Editor Examples

Examples of the Formula Editor

From the My Account section of our website, click on the bottom link - Custom Formulas http://www.trade-ideas.com/FormulaEditor/List.html.

v_up_1/v_up_5*5
This formula will look to the last 1 minute volume and compare it to the last 1 minute average of the last 5 minutes.  Entering a MIN value of 2 will ensure the last 1 minute volume is twice the average of the last 5 minutes, thus showing increasing volume relative to itself.

seconds_after_open/60/60
This neat little formula will allow you to define a time period in hours where your alert window is active.  Maybe I only want to see stocks pulling back off their highs during the last hour of trading.  Entering a MIN value of 4.5 and a MAX of 5.5 will only show signals during the hour preceding the final trading hour.

abs(open_p-last_price)/(high_p-low_p)*100
This filter when the MAX is set to 0, this filter will only show stocks that exhibited a doji candle the previous day. 

quality
You are already familiar with Quality from the Description column.  Quality refers to the alert specific filters that can be applied to specific alerts (it's the field next to the alert in the Configure Alerts window).  For instance in the new high and new low alerts, it details how many new day high or low it is.  If a stock is making a year high, the value for the quality will be at least 365.  But what if, for example, you only want to see three day highs and not four day highs?  Now with a custom quality field, you can specify 2.99 as the MIN value and 3.01 as the MAX.

(expected_open-t_low)/(t_high-t_low)*100
This formula ensures the open price is within a certain percentage of today's low relative to the current day range (high-low).

(expected_open-t_low)/t_low*100.0
This formula is slightly different.  Instead of looking to a percentage of the day range, it looks to the opening price and ensures the low is within a certain percentage of the price.

if(seconds_after_open<300,[PV],[RV])
This custom volume filter uses an if/then statement where during the first 5 minutes of the trading day, this filter will return the Percent Volume and after will display the Relative Volume.

Remember, you can always add the custom filter as a column to see the value of the data.