Target & Stoploss Levels in %

Hi nsm51

I will work on two aspects now, by myself.

  1. Position size text displayed on the first level of Stoploss line so that once I enter my entry price in the afl, it will also show me Qty that I can buy.

This is very important for me as risk & money management is all I am bothered with, majorly.

Do you think I can just add extra lines in the end of the formula to get Qty calculated & text displayed next to price text on the Stoploss LINES OR add it in the beginning of the Parameters?

So this way, I can choose which stoploss % level I want to choose for the trade & Qty will be instantly shown against that level to be traded. This saves lot of time for a momentum trader on a 1 min chart.

This is what I am expecting once I enter entry price :

Stoploss - 1% 0.8522 1024

(1024 being Qty I can buy)

If similar information is shown on all stoploss levels, it will be LETHAL.

  1. Changing colors of horizontal lines.

Thank you very very much for your valuable contribution.
You have created something of great value to me " without being proficient " .....!!!!!

Once you are 'proficient', God knows what all milestones you WILL achieve :slightly_smiling_face:

Best Regards

It is not that I did not get subscript error, the array is meant to hold custom colors as per choice and manage the size as per needs.
In the first bit of code even i didnt use Matrix, but its an idea incase there are two sets of custom colors for line and text if required.

I just filled it sequentially thats all, and i did not blindly copy-paste :smiley:

1 Like

Hello nsm51 & others

Can you please help in displaying Position size text, Next to Stoploss price levels in this afl I named, 'Percent Keeper' ?

Example :

Stoploss - 1.0% 1000
Stoploss - 2.0% 875
Stoploss - 3.0% 620

(1000 or 875 or 620 being Qty displayed, that can be traded )

Position sizing Parameters in Afl :

  1. Initial Capital - $ 1000

  2. Risk Per Trade Method - % or $$$

  3. Risk Per Trade - (If I chose % of initial capital in 2. then here % should be entered like 2% OR if I just chose a $$$ amount , then I can enter 20 here or anything 50 here)

  4. Location of Position size from current bar + 5 (distance from current candle, text plotted next to Stoploss price at so many bars distance)

  5. Color of Position size text

  6. Calculation of Position size - Risk per trade (3.) / Entry Price - Stoploss % Price = Qty to be displayed next to Stoploss Price

P.S :
I READ ApplyStop and other formula for calculaing stoploss & I DID try few but being a newbie, it will just take good amount of time to fall in love with syntax & other errors & master afl in due course of time. Till then my realtime trading cannot suffer because of poor money management.

I loose more time & money nowadays as I keep entering full throttle position sizes where in, I know extremely well, that I am only supposed to trade a certain size as per stoploss kept. Seeing quantity displayed, instantly, once Entry price is entered in the existing afl WILL certainly help.

Kindly assist without calling out on a newbie with strong terms like 'Spoon Feeding'.
You are not really, Encouraging, with strong terms like these.

You need to give people time to shape up at their own pace & if you can't assist,
just ignore hitting your keyboard buttons on this one.

Thank you very much for your understanding & kind assistance. I do appreciate it, thoroughly.

Best Regards

I found an AFL in my old laptop which showed me position size, Tp & Sl on top left corner.

Its calculating correct % of risk reward like 1:2 but not showing correct position size.

I wish someone can help me with correct position size in this afl.

I feel the correct way to calculate the position size (LONG) is -

RIsk per trade (in % of Investment amount or any fixed amount in $) / Entry price - Stoploss price

Kindly edit the formula so correct Qty can be traded.
Risk per trade I prefer by default is 1% of Capital.

Kindly offer your assistance on this.

Thank you.

Best Regards

SECTION_BEGIN("Risk Management");
Amnt = Param("Investment $ ",1250);
perc = Param("Target %",1,1,1.5,0.1)/100 ;
share = round(Amnt/C) ;
//Vol = round(ev) ;
Vol = Ref(V, -1) ;
per = Prec(((H-L)/C)100,4) ;
trgtup = Prec(C
(1.01+perc),4) ;
trgtdn = Prec(C*(1-perc),4) ;
Title = Name() + ", " + Date() + " O: " + Open + ", H: " + High + ", L: " + Low + ", C: " + C + ", Amnt = " + Amnt + "
Qty = " + share + "\nTP = " + trgtup + "\nSL = " + trgtdn ;


Can someone please help with position sizing part in this afl?



Can anyone assist in incorporating position sizing based on existing % stoploss in this afl?

Many Thanks.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.