# Trailing PNL Error

Hi , have set keyword for following in universal exit :

1. Exit if PNL > 1350
2. If Max PNL is greater than 1000 , then trail at 0.45 of Max PNL .
3. Here exit took place as soon as Max PNL crossed 1,000 .
Anything I’m missing here ?

The highlighted logic seems to say if less than 0.45* Max profit which is less than 1000. So it is fulfilled at 1000.

What are looking for?? Are you trying to trail 0.45 for every 1 point move in your PNL.

Example: Max profit moves from 1000 to 1010 your new trailing should move from 1000 to 1004.50 ??

hi, logic is if profit goes above 1000 then exit if pnl becomes less than 0.45 of profit i.e. 0.45 x 1000 = exit if pnl comes down to 450 from 1000 .
but its exiting as soon as profit hits 1000

Replace the 2nd condition. If PNL comes below 451.

This should check MaxProfit above 1000 and then if PNL comes below 451 it will exit.

thank you but i’m looking for profit to trail at 45% of max profit after it achieves 1000 .
so , if max profit goes to 1200 trailing SL will be 45% of 1200 i.e .540

check this tutorial of tradetron ( time 12.50 ) for reference .

(Max Profit - PNL in the Math Operation)

Replace the 2nd line with this line.

So it will check for a max profit of 1000 and also a minimum difference of 0.45 Max Profit.

Let me know if this needs tweaking.

thanks for your time and efforts buddy . will surely test it .

1 Like

You’re welcome.
Please let me know if this worked once you have tested it, so that I can verify if my logic worked.

Additionally, MAX profit and PNL are calculated using the entire strategy’s value; a multiplier is not required.

For example:
Maxprofit >3000
PNL<2000 * Multiplier
Assume 10 Lots is the multiplier.

Which meaning that only the exit occurs when PNL falls by 2000*10= 20,0000 loss breaches. So please, proceed with caution.

I’m hoping everything works out.

[email protected]

Additionally, MAX profit and PNL are calculated using the entire strategy’s value; a multiplier is not required.

For example:
Math Operation (MaxProfit-PNL)> (Max profit * 0.45),
No need for multipliers, which are already defined in the first line.

I’m hoping everything works out.

[email protected]

It is definitely an incorrect condition that has been created in YouTube.

For example:
You mentioned that your maximum profit was more than Rs. 500. Once that amount is exceeded, the system checks the second requirement, which is that you mentioned, your PNL less than (Max profit x 0.80) X Multiplier. At that point, you exit.

Assume Max Profit is 500 and assume 10 lots is the multiplier.

This means, the system will exit as follows;

Max Profit >500 x Multiplier
PNL<(MaxProfit x 0.80) x Multiplier

Calculation
As Soon as the PNL breaches the Max profit condition, ie 500, it will automatically exit, which is as follows:

PNL= 500
Max Profit also= 500
Then, as per condition

500< (500x0.80)x 10
500<4000

Automatic exit happens

First of all understand that, the first condition is your max profit and second condition to be your stop loss condition.

For example:
Max profit >3000
PNL<2000

This indicates that exit will occur as soon as the 3000 maximum profit is breached and the PNL drops from 3000 to 1999.99.

Additionally, MAX profit and PNL are calculated using the entire strategy’s value; a multiplier is not required.

For example:
Maxprofit >3000
PNL<2000 * Multiplier
Assume 10 Lots is the multiplier.

Which meaning that only the exit occurs when PNL falls by 2000*10= 20,0000 loss breaches. So please, proceed with caution.

I’m hoping everything works out.

[email protected]