Profit & Risk CalculatorThe "Profit & Risk Calculator" script in Pine Script (TradingView) is designed to help users calculate potential profit and risk when trading, and to provide alerts when specific price levels are reached (such as entry price, take profit, or stop loss). It includes several components as described below:
1. Input Fields:
The user can manually input various prices: entry price, stop loss price, and take profit price, with steps of 0.25.
There is also an option to input a custom value (e.g., for personal lot sizing) and a total investment amount.
2. Dynamic Lines:
The script draws dynamic horizontal lines for the input prices: entry line (white), stop loss line (red), and take profit line (green).
These lines are automatically updated based on the entered price levels.
3. Labels for the Lines:
Labels are added to the lines to visually indicate the entry, stop loss, and take profit levels on the chart.
4. Long and Short Position Calculations:
The script calculates potential profit and loss for both long (profit if the price goes up) and short (profit if the price goes down) positions.
It also calculates the distance between entry and take profit, and distance between entry and stop loss, along with the risk/reward ratio (RR).
5. Alerts:
The script generates alerts when one of the following conditions is met:
Entry Condition: The price touches or exceeds the entry price (high >= entryPrice).
Stop Loss Condition: The price touches or drops below the stop loss price (low <= stopLossPrice).
Take Profit Condition: The price touches or exceeds the take profit price (high >= takeProfitPrice).
6. Lot Calculations:
The script calculates both micro and mini lot sizes based on a preset table and the custom value.
The results are displayed in a table on the chart.
7. Profit/Risk Table:
The script shows two tables:
One table calculates the profit, loss, and risk/reward ratio based on the input entry price.
A second table shows the same calculations based on the current price.
8. Chart Display:
The script places tables and other visual data on the chart, such as preset values, profit and loss calculations, and the distance from take profit and stop loss to the entry price.
English Explanation of Each Part of the Script
1. Input Fields
The script starts with several input fields where the user can specify the entry price, stop loss price, take profit price, custom value, and investment amount. These values help define the parameters for risk/reward calculations.
2. Dynamic Horizontal Lines
Three horizontal lines are drawn on the chart, representing the entry price, stop loss price, and take profit price. These lines update dynamically based on user input.
3. Dynamic Line Updates
As the user adjusts their inputs, the position of the lines is updated in real-time to match the new price levels. This keeps the chart visually accurate.
4. Labels for Lines
Labels are placed on the chart next to each price line, allowing the user to clearly see which line represents which price level.
5. Long and Short Position Calculations
The script calculates the potential profit or loss for both long (prices go up) and short (prices go down) positions, providing users with an idea of their potential gains or losses.
6. **6. Risk/Reward Ratio Calculation
This calculates the Risk/Reward Ratio (RR) by dividing the distance between the take profit and entry price by the distance between the entry and stop loss price. This gives the trader an idea of how much risk they're taking relative to the potential reward.
7. Alert Conditions
The alert conditions are defined based on the price hitting the set levels:
Entry Condition: If the price goes up and touches the entry level, the alert is triggered.
Stop Loss Condition: If the price drops and hits the stop loss level, the alert is triggered.
Take Profit Condition: If the price rises and reaches the take profit level, the alert is triggered.
8. Alert Configuration
Each condition is linked to an alert that sends a message when the specific price level is touched. The alerts notify the user when the entry, stop loss, or take profit levels are hit.
9. Lot Calculations
The script includes a function that calculates micro and mini lot sizes based on a preset table and a custom value input by the user. This is useful for adjusting lot sizes to the desired amount and determining position sizes for trades.
10. Entry Price-Based Profit & Loss Table
A table is generated on the chart that displays detailed information about the profit, loss, and risk/reward ratio based on the entry price. It helps traders see the potential outcomes for different lot sizes.
11. Current Price-Based Profit & Loss Table
This second table provides similar information as the first but calculates profit, loss, and risk/reward based on the current price. This allows the trader to see how their position performs as the market price changes in real time.
Riskrewardratio
TradePlannerTradePlanner is trade planning tool which helps to map out your trade plan by displaying an entry line, a stop line, and multiple target lines (up to 5 targets) right on the chart. Each line can be configured to display the distance from the entry in terms of both number of ticks as well as the profit/loss in currency terms. An on-screen table quantifies and summarizes the entire trade plan information plus it calculates and displays the maximum lot size given the specified amount of risk you want to take per trade, which is totally customizable, all of which takes the guesswork out of trade planning.
Pinescript Risk Reward boxes + Custom 'Time Elapsed' MarkersUsing Pinescript to create custom Risk Reward Ratio (RRR) boxes with custom vertical time markers to help traders stay mindful of how long they've been in a trade.
//Usage:
-Add indicator to chart and you'll be prompted to click three times:
-- 1: Choose time (clicking last bar will mark entry as current candle's open).
-- 2: Click BOX TOP of RRR box on chart (long or short is toggled later).
-- 3: Click BOX BOTTOM of RRR box on chart (long or short is toggled later).
- then toggle Long or short in the dialog box.
-toggle on/off vertical time line markers (as reminder of how long you've been sat in your trade).
-User input choice of time line marker spacings (in minutes).
//Notes:
-Percentage reward and percentage risk are displayed in each of the risk reward boxes. Risk-Reward ratio is also displayed in the upper box.
-Bars to extend the RRR box to the right is also a custom user input.
-Note the 'entry' of the trade will always be the open of the candle you click on (the first click on loading the indicator).
-You can drag the vertical entry time and the horizontal box-top and box-bottom times dynamically, as you like, as trade progresses.
//Use-Case:
-I wanted a RRR box which gave me custom vertical time markers to keep me mindful of overstaying my welcome in a trade that likely was running out of steam and wasn't likely to go my way. Forcing me to stay nimble. I have found in daytrading that if a trade doesn't go your way promptly, it's often not a good one to hold.
AWD TRADE MANAGER (ATM) by ManhDNAWD TRADE MANAGER (ATM) is a position management tool including with some advanced features and entry suggestions. It helps you to do most of position calculations and position management, reduce time spent for charting by alerts.
There are 3 main things to describe about the manager:
(1) The original function of the manager is to help traders to manage their trades with automatic calculations of all factors of their trades with some of input values. For example, it will calculate the trade volume when you enter the bet size, entry and stop loss price. It calculates take profit price when you enter entry, stop loss prices and the risk/reward ratio, …
(2) Another function is the system of alerts. After set up a trade, create an alert and the manager will do the rest. It will send you an alert when the limit order got filled, got stopped out, take profit level hit, or even it reached a key level or an opposite/spike move just occurred…
(3) Entry suggestions: Suggest entries with price action strategies. Details bellow.
Features in details:
(1) Automatic calculations:
- Auto calculate trade volume based on entry, stop loss prices and the money users willing to lose when the trade is failed. Auto detect some type of assets and volume will be calculated in USD (for cryptocurrencies) or in lot (for forex).
- Auto calculate take profit price based on entry, stop loss prices and expected rr ratio.
-Auto suggest take profit price based on pivot points.
- Auto suggest stop loss price based on pivot points.
- You can enter several exit points with percentages and the manager will calculate the averaged risk reward ratio you earned after the last exit price reached.
- Quick entry price pick to reduce typing requirement.
- Quick trade set up: 2 checkboxes and 1 number entering to set up a trade.
(2) Alert system
After setting up a trade and creating an alert of the manager, it will follow the market and your order. It will send you alerts for all the events that you should follow up your position. These alerts can be sent to your pc, your phone and your smart watch, so even you are a full-time day trader, you will save your time for charting or managing your positions. Here’s the list of alerts:
- Sending alert when suggesting an entry with details calculated from preset inputs so you can just pick that info to enter the position including trading volume, entry, stop loss, take profit prices, timeframe, estimated risk-reward ratio …
- Sending alert when a limit order got filled and auto switch to position-managing-mode.
- Sending alert when a limit order in still staying unfilled but should be canceled (because of price reaching a key level or is running too far, …)
- Sending alert when the position got stopped out or TP hit.
- Sending alert when the running position reached a key level and need to be watched out.
- Sending alert when a spike move or opposite move just occurred.
- Sending alert when a position is taking too long to run.
- You can also set 3 levels of price with messages then ATM will send you alerts when price reaches those levels.
- When price runs, ATM might suggest you to move stop loss to levels based on pivot points by sending you alerts.
- Alert when a BOS occurred.
- Options to turn on/off each kind of alert.
(3) Entry suggestions.
The script included price action entry suggestions.
The 1st strategy is getting in a position when a candle pattern occurred and confirmed by MA20.
The 2nd strategy is detecting double top/bottom and a candle pattern confirm break out after that.
The 3rd strategy is a pullback strategy, in a trending market, a candle pattern occurs and confirms the pullback ends, it will suggest an entry.
All those strategies I am using by myself for a long period of time but to make sure they are good for your trading style, do your own research and backtest before use. Keep in mind to manage risk and be responsible to your capital.
User side modifications:
- Those price action strategies have some major arguments that users can tune themselves to make it meet their style or their needs like choosing method to suggest entries, refine entry quality by changing the confirmation methods,…
- Most of appearance factors can be changed by users.
- one-click to toggle between full features and simple mode.
TradingView Chart demo pictures:
Author's bio:
I have been a full-time day trader for 7 years. I like coding with Pinescript and I also developed some helpful indicators that provide unique aspects to approach markets and the most favorite one from that is Relative Volume Index (RVI) that will be introduced in near future.
Disclaimer:
This tool has been tested and been using for my own trading career for a long period of time but practicing to use it yourself to understand it and use it correctly is needed. All of the features have been carefully tested before publishing but make sure to double-check all the info you get from it before getting into a trade to avoid losing money by a sudden mistake or even a bug. Keep in mind you will need to take all the responsibility with your capital or any potential loss while using this tool.
If you get anything wrong while using it, please leave some comments bellow, all of your ideas or suggestions will be taken seriously.
Thank you in advance!
(It is not possible to explain all the settings or features within the description, If you have questions, please leave comment, I will answer to help you to get familiar with the tool.)
Scalper's toolkit - ATR WidgetWidget specifically designed for scalping. Many settings to fit the instrument and view preferences to make it fit into your chart window how you like, even on mobile.
** I have 5 other features to add into this in the very near future, as I use this as my primary tool for Risk reward. This script will be updated in the near future as more features are coded into it. See bottom for notes on plans
Features:
Displays a quick view of the ATR value on the chart, in decimal PIPs or directly in Points - a key value for scalping using the DOM for point value settings and one click trading on fast time frames.
Automatic calculation of stop and target distance for a predetermined Risk Reward Ratio (Set with the settings panel), and then also displayed in PIPs or Points for easy use in quick trading.
Works on most all instruments/pairs/cryptos with multiple precision levels for correct values to be shown in the widget.
Fully customizable -
ATR period Base setting, just like a normal ATR indicator
Display in : PIPs or Points
ATR based stop distance, using a multiplier. 2 is the most common multiplier used, and the default setting.
Risk Reward Calculation using the Stop Loss value.
-Quickly helps with proper target and stop sizing for the volatility in the price on the current trade entry point.
-Set to any ratio you wish, from 1:0.1 all the way to 1:100 or more, unlimited R ratio settings to fit your strategy and risk tolerances.
Position anywhere on the chart window with 9 preset locations available (Pine script limitation)
Show as a column layout or a row layout
Customize the Size, with 5 preset widget sizes, from tiny to huge (Pine script limitation)
-Mobile Friendly - Tiny or Small may be too small on PC, but can be used for Mobile so the widget does not become too large over the chart.
Custom text, background, and boarder colors
Custom Boarder Size - 0 size is no boarder
Set up:
-Open the settings panel.
First section is the basic settings for the ATR - the length (Default is 14) and to use a PIP value display, or Point value display.
Here you also see a "Precision" Setting. **Because each instrument returns different precision ATR values, it is difficult to determine with code what those values will be ahead of time to do the math in the background. Even some 2 decimal instruments return 5 decimal ATR values, so this setting filters that** Just use the dropdown and choose how many decimal places the instrument has from 2 - 5 decimals
The second section is for risk and reward calculations, and can be disabled if you do not want to see these values.
The first value is the "ATR Multiplier" Typically, a 2x multiplier is used on the ATR to determine how far away to place your stop loss from the entry, placing it out of harm's way from normal market activity.
The second value is the Reward target distance, based from the stop loss size. This quickly calculates your target to match your intended reward ratio, saving some manual work to calculate this by hand every trade.
** Note: because of the math used in the code, you may see odd values on some instruments, like indexes. If you have the precision correct, try changing the "Show in Pips" to "Show in Points", as this may solve the issue.
The last two sections are purely for how the widget looks and how/where it shows on the screen. These can be set however you like. To have no boarder, just set the "Frame size" value to 0.
Additional Updates planned:
Pip value calculation (2 feature uses)
-This will serve 2 purposes. The widget will calculate the value of the trade based on the lot size. It will also have a risk limit, so if the ATR get's too high for the current risk settings, It will show red to warn you of a high risk situation before you trade.
Example, you have a set limit of 3 dollars per trade using .02 lot sizing. If the ATR get's too high, The Stop value will be more risk than you would like to use at that trade sizing. Reduce the trade size, or wait for ATR to come lower.
Purpose 2: lot size calculation, so if you wanted to maximize the use of risk available. If you wanted to risk 600 for example, it would use the ATR you have set for the risk, and determine the proper lot size for the amount of volatility in the market. This way, you Risk Exactly, or as close as possible to 600 for the the current trade conditions.
Extra use for this value: Show the Current trade amounts at risk and for gain in money values on the side of the pip/point value. Know what you're risking and also trading for in monetary value.
ATR candle Comparison- Early momentum Detection (2 feature uses)
Will show an additional section on the bottom of the widget to show how each candle compares to the one before, up to the last 5, and show if ATR went down, up, or stayed the same over the last 5 candles.
Show an additional symbol to indicate the current candle status in comparison to the close of the last candle. Real time of if the ATR is getting larger, smaller, or staying the same.
Alpha Cloud Algo Risk Reward CalculatorAlpha Cloud Algo Risk Reward Calculation Usage
This indicator helps users manage their positions by allowing them to set customizable take profit and stop loss levels. It helps investors better understand the risk and reward levels of their positions.
Indicator Settings:
Language: Choose the language of the indicator (currently only Turkish is available).
Position Type: Choose either a long or short position option.
Entry Price: Enter the price at which the position will be opened.
Risk Percentage (%): Specify the percentage you are willing to risk in the trade.
Take Profit Type: Choose an option to determine your take profit level as a ratio or price.
Take Profit Value: Enter your take profit level (depending on whether it is a ratio or price type).
Stop Loss Type: Choose an option to determine your stop loss level as a ratio or price.
Stop Loss Value: Enter your stop loss level (depending on whether it is a ratio or price type).
Leverage: Enter the amount of leverage you will use in the trade.
Investment Amount ($): Enter the amount of investment you have allocated for the trade.
Main Capital ($): Enter the amount of your available main capital.
Usage of the Indicator:
After filling in the indicator settings, the take profit and stop loss levels and labels will appear on the chart. The labels also show the amount of risk and reward, in addition to the levels.
The Stop Loss label contains the following information:
Stop Loss level
Total loss amount (in dollars)
Percentage risked (as a percentage of your main capital)
This indicator is designed to speed up the decision-making process and help investors more effectively evaluate potential risks. It allows investors to apply risk management strategies more effectively while trading.
Turkish Language
Alpha Cloud Algo Risk Reward Hesaplama Kullanımı
Bu gösterge, kullanıcıların pozisyonlarını yönetmelerine yardımcı olmak amacıyla özelleştirilebilir kar al ve stop loss seviyeleri belirlemelerini sağlar. Gösterge, yatırımcıların pozisyonlarındaki risk ve ödül seviyelerini daha iyi anlamalarına yardımcı olur.
Göstergenin Ayarları:
Dil: Göstergenin dilini seçin (şu anda sadece Türkçe mevcuttur).
Pozisyon Türü: Uzun (Long) veya kısa (Short) pozisyon seçeneklerinden birini belirleyin.
Giriş Fiyatı: Pozisyonun açılacağı fiyatı girin.
Risk Oranı (%): İşlemde riske atmak istediğiniz yüzdeyi belirleyin.
Kar Al Tipi: Kar al seviyenizi oran veya fiyat olarak belirlemek için seçeneklerden birini seçin.
Kar Al Değeri: Kar al seviyenizi girin (oran veya fiyat türüne bağlı olarak).
Stop Loss Tipi: Stop loss seviyenizi oran veya fiyat olarak belirlemek için seçeneklerden birini seçin.
Stop Loss Değeri: Stop loss seviyenizi girin (oran veya fiyat türüne bağlı olarak).
Kaldıraç: İşlemde kullanacağınız kaldıraç miktarını girin.
Yatırım Miktarı ($): İşlem için ayırdığınız yatırım miktarını girin.
Ana Para ($): Kullanılabilir ana paranızın miktarını girin.
Göstergenin Kullanımı:
Göstergenin ayarlarını doldurduktan sonra, grafik üzerinde belirtilen kar al ve stop loss seviyeleri ile etiketler görünecektir. Etiketler, seviyelerin yanı sıra risk ve ödül miktarlarını da gösterir.
Stop Loss etiketi aşağıdaki bilgileri içerir:
Stop Loss seviyesi
Toplam kayıp miktarı (dolar cinsinden)
Riske atılan yüzde (ana paranızın yüzdesi olarak)
Bu gösterge, yatırımcıların karar verme sürecini hızlandırmalarına ve potansiyel riskleri daha iyi değerlendirmelerine yardımcı olmak için tasarlanmıştır. Yatırımcıların, işlem yaparken risk yönetimi stratejilerini daha etkin bir şekilde uygulamalarına olanak tanır.
Basic Position Calculator (BPC)In trading, proper position sizing is essential to managing risk and maximizing returns. The script provided is a Basic Position Calculator that allows traders to quickly and easily calculate their position size, stop loss, take profit, and risk reward ratio for a given trade.
The script starts by defining several inputs for the user to customize the calculations. The first input is the "Account Size", which specifies the total amount of funds available for the trade. The next input is "Risk Amount %", which is the percentage of the account size that the trader is willing to risk per trade. The "Stop Loss" input specifies the maximum amount of loss that the trader is willing to accept, while the "Reward" input is the desired profit target for the trade. Finally, there is a "Position" input that allows the user to specify where on the chart the table of calculations will be displayed.
The script then calculates the position size, stop loss, take profit and risk reward ratio using the user-specified inputs. The position size is calculated by dividing the risk amount by the stop loss. The stop loss is calculated by multiplying the stop loss percentage by the close price, and the take profit is calculated by multiplying the stop loss percentage by the close price and the reward. Risk-reward ratio is the ratio of amount of profit potential to the amount of risk in a trade.
The script then creates a table and displays the calculated values on the chart at the specified location. The table includes the following information: account size, position size, account risk %, stop loss, stop loss %, take profit, take profit % and risk reward ratio. This allows the trader to quickly and easily see all the key calculations for their trade in one place.
Overall, the Basic Position Calculator script is a valuable tool for any trader looking to quickly and easily calculate their position size, stop loss, take profit, and risk reward ratio for a given trade. The ability to customize the inputs and display the calculations on the chart makes it a useful and user-friendly tool for managing risk and maximizing returns.
Position Size and PNL CalculatorPosition Size and PNL Calculator is a Tool indicator which will help trader determine Trading's Position Size base on many risk management method such is Risk Per Trade, Fix Position Size, Fix Initial cost. The stoploss of the order will be set after ATR Stoploss method like my lasted Indicator ATR Stop Loss and Take Profit Finder .
This Tool is using the concept of
- ATR ( Average True Range )
- Risk Reward Ratio (Money Management method)
- Leverage Position Size Calculation
- Leverage PNL Calculation
- Risk Per Trade money management for calculating the size of position base on Account Balance and Risk
How Position Size and PNL Calculator working?
1) The tool will let user Input time and price that trader are entering the order. Then trader have to select the direction of trade, weather it is long position or short position
2) Next It will use entry price to Calculate the Stoploss price buy Calculating its ATR according to the setting then, then The entry price will be plus/mins by ATR*Multiply to get a Stoploss price
3) then we will * Risk Reward Ratio to the distance of stoploss in order to create Takeprofit price
4) After then the tool will simulate and calculate Initial cost/Initial position size base on your setting, and will display Stoploss Price, Take Profit Price, PNL% of Loss if Stoploss is trigger, PNL% of Gain if Take profit is Trigger and current RR/ PNL%
5) User can adjust the leverage and other setting in Indicator setting
How to use Position Size and PNL Calculator
As it was mention, Position Size and PNL Calculator is just a tool that help trader determine Trading's Position Size, PNL and risk management. Trader must use this tool only as a Position Tracking after you help entry order with your our trading strategy
Zeal Trade HelperOnce you have mastered a trading strategy, risk management is the most important aspect of trading that will enable and long and successful trading career. The Zeal Trade Helper is based on Van Tharp's theory of R. It provides an immediate visual trading plan, as well as sizing parameters for trading equity and options (.25 and .50 deltas) based on a number of inputs to help you avoid needing to do quick mental math in the moment of taking a trade.
HOW TO USE
- First, you will need to input your R value. To find your R value, divide your **average green day** by the **average number of trades you take in a day**. Once you have this number, enter it into the "Your R Value" field in the indicator settings.
- The indicator settings then provides you with 5 different setup entries. When you have your watchlist ready for the day, simply go through and choose the specific stock, enter your entry price, stop loss, target, and setup type (build, short, bounce, or reject).
OUTPUTS
**Trading Plan**
The indicator will display a visual trading plan based on the inputs you entered on each individual stock's chart. The trading plan will have a green box and red box to represent your entry, target, and stop loss.
**Risk Parameters**
The indicator will also display text outlining what your risk parameters and sizing should be for the trade based on your R value. You will see 3 different lines: the first line showing the number of shares you can trade, the second line showing the number of option contracts you can trade at .50 delta, and the third line showing the number of option contracts you can trade at .25 delta. For reference, at the money options are .50 deltas. Even if you aren't trading exactly .50 or .25 deltas, these values will still help as a frame of reference in the moment of putting on the trade.
**Note that you can toggle the appearance of either of these outputs by checking/un-checking the boxes next to "Display trading plan" and "Display risk parameters" in the indicator settings.
Examples:
1. "**240 shares with $1.25 risk**" means you can take 240 shares and risk $1.25 on the share's price based on your R value
2. "**4.8 Cons @ .50 delta with $0.62 risk**" means you can take either 4 or 5 at the money option contracts and risk $0.62 **on the option contract's value** based on your R value
3. "**9.8 Cons @ .50 delta with $0.31 risk**" means you can take either 9 or 10 option contracts that have a .25 delta (a bit out of the money) and risk $0.31 **on the option contract's value** based on your R value
Happy Trading!
R-Calculator
Visualise your possible 1R to 6R prices, based on your Risk($), entry and stoploss price, and see the distance until the goal is fulfilled.
It also provides you with a suggested amount of stocks to buy, so if you lose, it will match -1R.
Close to SupertrendMany a times, we have seen that the price closing in towards supertrend reverses.
This indicator gives signal that identifies high / low of any candle if near the down / up supertrend line by a defined margin using arrow signals.
I've simply re-used readily available supertrend indicator source code and just modified it to these signals. So, almost all of the source code is not mine.
Enter the short / long position when arrow signal appears.
SL / trend reversal will be mandatorily at close of a candle above or below the supertrend line, and the supertrend changes direction.
Hope this indicator comes handy for you.
BTCUSD Risk Oscillator- To be used with the BTCUSD All Time History Index (on the daily)
- Estimates the current risk of BTCUSD
- The risk model oscillates between 0 and 1 (0 is the lowest risk, 1 is the highest)
- Historically, buying when the risk is low and selling when the risk is high yields good ROI
- User inputs generally do not need to be changed, they are used to create integers for the normalization process
Auto Position Sizing Risk RewardThe Auto Position Sizing Risk Reward indicator shows different Risk levels 1, 1.5, 2 and 3 based on your risk amount and uses an auto Stoploss level based on the ATR.
You can set the values for the "Note or Title", "Risk Amount", "Entry", "Target Price", "Stop Loss Distance", "Default Risk/Reward" and ATR settings.
The "auto" part comes into play when you haven't yet set an Entry value, which will make everything update according to the latest Closing price of the asset.
Once you set the Entry price, the Risk/Reward levels will stop updating their positions and stay in place. This allows you to dynamically see your potential Risk/Reward as the market progresses, as well as locking in your Risk/Reward levels once you are ready to enter a position.
Your Position Size as well as actual Stoploss level and Cost is displayed along with the other values in the textbox that floats next to the R/R levels.
This indicator was inspired by and relies heavily on the work done by zzzcrypto123 and NXT2017 in their indicators, but I felt that this version is unique enough to hopefully be of use to the general community.
I hope this helps you to trade better! Please feel free to improve it and provide suggestions.
Automatic Risk to Reward PivotsIn a nutshell I was tired of guestimating what my risk was between pivots when getting into trades I went to work on the basic math behind the relationship of the pivots to find their natural risk to reward ratios.
The natural risk to rewards span high and low...for example...you can go from the S3 --> R3 and that R:R is with a stop loss of the S4 is 7.4
But making all of those possibilities in code is excessive and for simplicity sake I price can only be between two pivot areas at any point in time.
So this auto risk to reward is limited to the 2:1 opportunities. If you by chance do the math for all of the possibilities as I have then it would be easy to change the Take Profit levels.
I use the fibonacci pivot points in this indicator but I include the mid levels and further extensions totaling 20 levels, 21 including the pivot.
Here they are...the generic plots are bolded...the additional levels are the other fib levels
R7 - 200%
R6 - 162%
R5 - 141%
R4 - 127%
R3 - 100%
R-C - 76%
R2 - 62%
R-B - 50%
R1 - 38%
R-A - 24%
Pivot
S-A - (24%)
S1 - (38%)
S-B - (50%)
S2 - (62%)
S-C - (76%)
S3 - (100%)
S4 - (127%)
S5 - (141%)
S6 - (162%)
S7 - (200%)
The indicator give you the setups for uptrends and downtrends based on the pivot point moving averages (ex. ema(hlc3, 34)) from a higher timeframe which you will be free to change yourself in the inputs.
For my setup, I trade from the daily pivots using the 10m or 5m chart so my next level up is the weekly pivots which I view using the 1H chart candles.
In the next iterations I will add the ability to change the MA lengths.
Pivot Point Moving average lengths
Weekly lengths - fast 34 : slow 55
Monthly lengths - fast 13 : slow 34
Yearly lengths - fast 13 : slow 34
Rules for Uptrends
Fast MA > Slow MA
Session high < r6
Rules for Downtrends
Fast MA < Slow MA
Session high > s6
Timeframes applicable are only those who have a higher pivot set above it
Monthly_SR = 240m, 300m, D
Weekly_SR = 26m, 30m, 60m
Daily_SR = 1m, 3m, 5m, 10m, 15m
Your take profit line will always populate where your risk will be 2:1
Your stop loss will always be one pivot level underneath or above your entry
Feel free to ask any questions. Trade well my friends!