This thread will contain all details about the usage of “PNL” keyword, “PNL Underlying” Keyword, “Max Profit” keyword etc and its different examples:
This thread will contain all details about the usage of “PNL” keyword, “PNL Underlying” Keyword, “Max Profit” keyword etc and its different examples:
PNL Keyword Calculates PNL of the “Entire” Strategy, so even if you use the PNL in Set, PNL of entire strategy will be calculated and accordingly the strategy condition will be executed.
Note that same applies for “PNL Underlying” keyword, however, PNL Underlying keyword will calculate PNL only of the particular stock mentioned in the list of PNL Underlying i.e. will calculate the profit for each stock separately in the list. It will not calculate PNL of all stocks combined in the PNL Underlying list.
The “PNL Underlying” is to be used in set exit, whereas PNL keyword is to be used only in Universal Exit.
More on PNL Underlying Keyword:
“PNL Underlying” Keyword for List of Stocks on Tradetron
Kindly watch this video:
Example 1:
Also, please make sure to use brackets properly:
Example 2:
Example 3:
In following Example, when Max profit reaches 500, the condition will be activated and when the profit goes below Max profit - the defined number, it will exit the position
Eg: 500 - 100 = 400.
Example 4:
Below is an example of:
When Max profit reaches Rs. 150, I want to trail it by 36 Rs.:
Example 5:
Another use of Max Profit Keyword Can be as below:
So as per the log generated for this condition:
Max_pnl ( ‘5318525’, ‘25’ ) : 956.2501525878906
PNL ( ‘5318525’, ‘25’ ) : -182.49984741210938
Whenever the PNL goes below the Highest PNL (Max PNL) reached for the counter by 1100 Rs, the strategy will automatically exit. As seen above, the max profit reached was 956.25, then after that when if fell by 1100 points, from max profit to -182.49, the strategy exited.
What is the use of “Multiplier” Keyword:
In deployed page, you can customise the multiplier according to your choice, what it does is , multiplies the qty by that amount when executing a trade. So when you add this condition in PNL it multiplies the amount by the same multiplier you deployed with.For eg:
Standard pnl condition is 1500
When used multiplier in deployed as 2x
Pnl condition is 1500 x 2 = 3000

Question: Leg Exit based on PNL:
Below is an example of calculating PNL for a particular traded leg:
In the below image:
Please make sure to use brackets properly.
Question: Set Exit Based on Target or Stoploss of Rs. 500.
Solution:
This is based on assumption that positions are Short Call as (NIFTY BANK, 1,1,1) and Shot Put as (NIFTY BANK, 1,1,2).
In Short Straddle / Strangle Position: How to move SL to Cost of One leg after the other leg has hit Stop loss:
Now, the First Repair will be constructed as follows:
Here we check 2 Conditions:
Similarly, the Second Repair will be constructed as follows:
Here we check 2 Conditions:
3. Independent stop loss for Leg 2, i.e. Put Leg, is set at 10 points higher than its Entry price.
4. In the 2nd part below: We are first checking if the Call Leg SL (which is in 1st Repair Once of set 1) has been traded, i.e. SL is hit with ‘Traded Instrument’ keyword. Also, we are checking that the Net Quantity of the Call leg is now 0, means it is squared off. Hence, we will move the SL of the Put Leg to Cost by using the formula: LTP (Traded Instrument Name.. 1,1,2) > Traded Instrument (Entry, Price, 1,1,2).
Request received. Pick a time now, or close this and we'll call you to set one up.
The calendar didn't load here. Open the booking page ↗
Booked. The calendar invite is on its way to your email.
Tradetron's AI assistant — pricing, brokers, strategies, anything.
AI can make mistakes. Consider checking important information.
How good was it?
We store the question and the answer with your report so the team can audit it.