Position and Risk CalculatorFirst of all I'd like to thank @Famouzx
for the use of his original code. I had this idea for a long time - but, had no idea on how to execute it. I found a reference to his script and it had some elements that showed me how this could be completed.
This script does two main things:
First, the user can input their account size and risk amount and the script will calculate the amount of size to enter the trade. The user can also choose the size they desire and it will calculate the risk amount.
Second, the script will project TP levels based upon input from the user. There are two take profit level types: The first is TP levels based upon risk/reward and the distance between the SL and Entry. The second is that the user can use a "measured move" to project TP levels.
There are options for the levels to show or not show the following: Ticks, USD, R/R, and the security price for that level.
For my use case I use several different elements of this script:
1) I use the Entry and SL locations to provide me with the correct size to enter the trade.
2) I use the Measured Move elements to set take profit levels.
3) Within the Take Profit levels I use Fibonacci levels.
In the next image one can see how this works.
1) The Stop and Entry are set. In the settings the risk is set at .4% of 50k and that is $200 which is shown in the table on the top right. The correct size for that amount of risk is shown on the Entry line as 2 Micros (this is NQ Futures).
2) The Measured move begins at the top of the last impulse up and ends on the first mail reversal that dips into the "golden zone" and is rejected. This is the distance is used to calculate the TP levels and the Fib levels.
3) The RR, USD profit, and ticks are calculated using the SL and Entry.
So, the trader can calculate the entry size and R/R before entering the trade.
In this example we can see that there was profit taking at the 0.618 (an almost guaranteed level to reach in most of these type of setups). And, you can see that is an important level as this trade finished at the 1.618 level.
In the next image the trader is not using the measured move or fib take profit levels. They are only using the SL and TP. But, the Risk is still $200 and the script shows that 2 micro contracts should be used. In settings the user could make the TP levels transparent if they only wanted to use the size calculator.
This video demonstrate how to use the script.
Please DM me if any bugs are found.
Penunjuk Pine Script®






















