"Traded Instrument", "Traded Instrument Name" and "Net Quantity" Keywords: Different Examples of its Uses

This thread will contain different examples of powerful combination between ‘Traded Instrument’, ‘Traded Instrument Name’ and ‘Net Quantity’ Keyword to get desired results

Please watch the below video:

:

Please watch below video to learn How to Identify Set No., Condition No. and Leg No. of a Strategy on Tradetron:

:
Please also watch the below Strategy Creation video on " Short Straddle - Trail / Move SL of other Open Leg to Cost", which shows effective ways of using “Traded Instrument” and “Net Quantity” keywords together:

So as per the above image:

  1. If we want to refer to: Set No.1, Entry Condition No. 1 and Leg No. 1, which is the SELL CE position, we will use the following references for ‘Traded Instrument’ and ‘Traded Instrument Name’ keywords:

Traded Instrument:
image

For Traded Instrument Name, under Net Quantity Keyword:
image

  1. Similarly, For SELL PE position, which is Set No.1, Entry Condition No. 1 and Leg No. 2, we will use the following references for ‘Traded Instrument’ and ‘Traded Instrument Name’ keywords:

Traded Instrument:
image

For Traded Instrument Name, under Net Quantity Keyword:
image

  1. To reference the First “Repair Once” condition strike, under Traded Instrument Keyword, we use:

image

  1. To reference the Second “Repair Once” condition strike, under Traded Instrument Keyword, we use:

image

Same reference can be used under “Traded Instrument Name” Keyword under “Net Quantity”

  1. To reference the First “Repair Once” condition instrument, under “Traded Instrument Name” Keyword, under “Net Quantity” Keyword, we use:

image

  1. To reference the Second “Repair Once” condition instrument, under “Traded Instrument Name” Keyword, under “Net Quantity” Keyword, we use:

image

  1. To Check if the instrument has got Traded / Entered and has also been squared off or Exited:

The following example is assuming, we have 2 legs entered in Entry condition:

Over here:

  1. First we are checking if Traded Instrument Strike, Leg no.1 is Traded, i.e. Entered the Position.
  2. Second, we are checking if Traded Instrument Strike , Leg no.2 is Traded, i.e. Entered the Position.
  3. Third, we are checking if Traded Instrument Strike, Leg no.1, has also got exited since the Net Quantity of the same is now 0
  4. Fourth, we are checking if Traded Instrument Strike, Leg no.2, has also got exited since the Net Quantity of the same is now 0.

This formula comes in handy when you want to exit a particular set based on if the instruments have entered the position and later have got squared off.

Remember to use all the 4 conditions together with “AND” operator as shown in the image below:

Question: I have 2 Repair once conditions of which the 2nd one, should trigger only after the first one triggers. Now the first one has a condition which can get triggered at any time. How do I put a condition in the 2nd RO condition to trigger, based on the 1st RO condition trigger? What value of RO 1 can I put to check condition on, to see if RO1 got triggered?

Solution:
Following is to be used in “Condition Builder” section.
It is basically checking if Repair Once of Set 1, Condition no. 1 and Leg no. 1 has already triggered.

image

Traded Instrument for Strike Selection, 100 points away from 1st Entry Strike:

The following is to be used in Strike Fx section of the “Position Builder”:

image

Traded Instrument for Strike Selection, 100 points away from 1st Repair Strike:

image

To square off 50% or half of entered quantity, you can use the following formula in “Qty Fx” section of the Position Builder:

Assuming, You are trading NIFTY BANK Options, where the Lot Size is 25. Then:

a) In order to check if Net quantity of Set 1, Condition 1, Leg 1 is 0, we use following formula:

b) In order to check if Net quantity of Set 1, Condition 1, Leg 1 is 25 (1 Lot), we use following formula:

c) In order to check if Net quantity of Set 1, Condition 1, Leg 1 is -25 (-1 Lot), we use following formula:

d) In order to check if Net quantity of Set 1, Condition 1, Leg 1 is -50 (-2 Lots), we use following formula:

e) Also, if you are using ‘multiplier’ to trade larger quantities, please make sure to use ‘multiplier’ keyword with ‘Net Quantity’

Eg:

Hello @Nelson
Does Unlerlaying matter while selecting leg number?

Suppose I have 4 Legs in my entry conditions 2 each of Nifty and Bank nifty in entry condition; say NIFTY ATM CE (leg 1) NIFTY 50 ATM PE (leg 2) Bank Nifty ATM CE (leg3) Bank Nifty ATM (leg4)?
if i want to select bank nifty CE in repair once condition using traded instrument (Entry,price,BankNifty,1,1,??) should it be 1 or 3 to select CE entered in 3rd leg of ENTRY…

Does Unlerlaying matter while selecting leg number?

Yes. All fields need to be filled. Also please try to keep both indexes in separate sets. instead of using just 1 set for both. It will help you in debugging if there is some issue.

Thanks

can you please guide me to an example or documentation; where sets are explained for different or same entry conditions? when i tried creating different sets only 2nd set was getting executed while 1st set which had a nifty straddle didn’t trigger.

Also for better understanding can you guide me how traded Instrument fetches. "Is leg number depended on Underlaying or LEG is part of Condition.

Will this give me total number of CE and PE active ?

Can someone please help me with this error-
I am trying to apply my condition check on the call/put i am trading (volume of that traded instrument is higher than average of last 20 candles15m)
Position ( Volume series ( Traded Instrument Name ( ‘6224572’, ‘1’, ‘Entry’, ‘instrument’, ‘NTPC’, ‘1’, ‘1’, ‘1’ ) , ‘15m’, ‘volume’, ‘All’ ) , ‘-1’ ) : get_func_output tt_get_element ( tt_get_voi ( find_traded_instrument ( ‘6224572’, ‘1’, ‘Entry’, ‘instrument’, ‘NTPC’, ‘1’, ‘1’, ‘1’ ) , ‘15m’, ‘volume’, ‘All’ ) , ‘-1’ ): Error 400: {“error”:“error parsing query: unable to find time zone None”}