TradingView
Tom1trader
23 de Dez de 2018 02:48

Price Move exceed % Threshold & BE Evaluation -Tom1trader 

SPDR S&P 500 ETF TRUSTArca

Descrição

https://www.tradingview.com/chart/OsBXckpZ/
Category is difficult with this one. I chose ROC as the closest as this measures the historical % of a given change amount.

This indicator is in a separate panel above or below the main chart. I use it only for Options trading to help with probability reckoning.
Use it (at your own risk) and the code freely and please ask any questions, glad to add detail / clarify and glad to know if you see I screwed something up. :-)

1. Plots when a percent move per candle is exceeded [from previous close] +exceeded is an "x" at top of panel and - is an "x" at panel bottom.
2. Plots (at last candle only) prices that are the selected % above and below the current close with thick black lines. TIP: For this to work best, in chart settings
"Scales" tab, check the "Indicator last value" and "No overlapping labels" check box.
3. Sums the number of times it occurs in a given number of candles ("Bars to sum . ." input).
TIP: On longer time frames (month+) reduce the length ("Bars . . sum" input) until get sums% plot.
4. Plots green and red lines for plus and minus sums as a percentage.

User inputs:
***** BTW did you know you can customize the time frame so one candle is (for example) 3 trading days?
1. Set the time frame of chart - NOTE this can be customized to what you need by scrolling to the bottom and adding the time frame you want i.e. 3 days or 2
weeks per candle. Remember these are trading times so 21 calendar days are 3 weeks or 15 trading days.
2. Choose the % threshold default 2% (+1.02 and its inverse for -) steps are 1/10th of a % (.001).
3. Choose the sum length("Bars . . sum . ") from 10 to 100 in number of candles.

Bottom line you can see the historical percentages and prices for a given percent move or can dial in a given break even (plus , minus or both) to see its past % occurrence and % move. One has to take into account changes in the market which show up clearly from the x above or below showing each occurrence (example: See more hits ("x"s) recently? Sum for recent length only to get more accurate reflection of market now.). Anyhow it is fun to play with and is part of how I do my own probability reckoning.

Notas de Lançamento

Count occurrences of price exceeding a chosen % move with up and down moves counted separately. Source in "from" period and target in "to" period selectable (i.e. How many times in last selected period has the price gone down and up from previous [choice ohlc] to current [choice ohlc] candle? More detail: In last 100 trading 1Ds from the close of one day until the open of the next day has price exceeded the selected percentage [.02 = 2%]? 1D in this case just means it is being used in the daily timeframe. Useful to determine how often your target or break even or stop loss etc. has been exceeded/hit in the past. Because you can look at each occurrence you can see the situation when it happened [up/down trend, reversal point, after exhaustion move and etc.
Comentários
Tom1trader
Afterthought on how to use this. When you want to change the % threshold to dial in a specific break even price it is easiest to watch the last two numbers to the right of the indicator short title. If they are n/a you must move the curser off the right of the chart (as they are a last candle value). To do this, after opening the indicator setting (click gear inside of panel) grab it with the mouse and move it to the right of the chart then move the curser off the chart to the right and mouse to the indic settings window without going over the chart. Then you can see and use last (down side threshold) number or second to last (up side threshold) to dial in a break-even for evaluation (evaluation is seeing the percentage of times it has been hit over the number of candles you are looking at (length of sum or "Bars . . ." input). It would be nice to use the indicator readings on the flags to the right but they overlap while using the settings and do not undo the overlap (presuming you have on the main chart settings "scales" tab checked the boxes for "Indicator last value" and "No overlapping labels". Yup it is a lot of messing around but I find it valuable enough in my trading to want to share it. Keep smiling!
Tom1trader
Just noticed the free subscription does bit allow custom periods (i.e. daily, weekly, etc - a 2 week period would be custom) on charts. The minimum PRO subscription does allow this and makes this indicator much more useful. If you have free registration or are unregistered I recommend using the next greater period than your intended time in trade as that will be a more conservative (safer) result.
TransitMan
From a structural level it would be helpful to be able to size those X's Mr Tom :) They look great on shorter zoomed in time frames but are barely visible when zooming out . Looking forward to studying this over the coming weekend !
Tom1trader
@TransitMan,Using plotshape(). I think plotchar() works the same - tried several things to allow size to be customized with the indicator format dialogue and found nothing that gives you a handle on size except changing the code from size.auto to size.tiny or .small etc. Best thing I found: the user can change the shape from x-cross to flag which stands out the best of the available shape choices. Thanks for the suggestion anyhow!
Mais