Decision Recipes

Comparing Position Duration

Comparing position duration allows you to reference an open position’s duration from entry. Here is how to use it.
Comparing Position Duration
Steve Henry
May 14, 2021

The decision recipe for comparing position duration has three inputs:

  • Position
  • More than / less than / exactly
  • Days

This decision recipe allows you to reference an open position’s duration from entry. The recipe monitors the position while it is open.

Screenshot displaying the decision recipe for comparing position duration

Because the comparing position duration decision recipe uses information from an existing position inside a bot, it is typically used in monitor automations and after a repeater action.

Screenshot highlighting the repeater action in the automation editor

The first field prompts you to choose an existing open position inside the bot. Each existing position in the bot will be linked, and this field will pull in the necessary data from the position.

Screenshot highlighting the position link associated with the repeater action

The second field has you choose if the position has been open more than, less than, or exactly a specific amount of time. The third field prompts you to choose the number of days from a dropdown menu. When you have finished creating the recipe, select “Save.”

Screenshot highlighting the save button following the decision recipe inputs

NOTE: You can also create a custom input for the number of days, which allows you to input the field later to make the decision recipe dynamic across all automations.

The decision will be added to the list of criteria. You have the option to add more decisions to the recipe or return to the automation editor. When finished, select “Save” again to return to the automation editor.

Screenshot highlighting the save button to return to the automation editor

The automation editor will display your completed decision criteria for comparing position duration.

Screenshot highlighting the decision recipe within the automation editor

You can always select the decision inside the automation editor and make changes to the criteria.

No tags found.
Next article
Evaluating Position Underlying Symbol
Evaluating position underlying symbol allows you to make decisions based on the underlying symbol of a position. Here is how to use it.
Was this helpful?
FAQs

Why is it important how long a position has been open?

It is important to understand how long a position has been open for the purpose of "theta decay". Theta is a greek metric that represent time value priced into an option. The longer a position is open, the more theta decay occurs. And the decay happens faster as you get closer to expiration. If you're long an option, this is good. If short an option, its not good.

Why would I use a repeater with this function?

A repeater will automatically scan all open positions of a certain type to see how long a position has been open. Instead of individually selecting a position duration monitor for each position, you can scan them in bulk which saves time and simplifies the process.

Can I use this automation to open a position?

Position decisions are best used for monitoring positions in anticipation of closing a position.

Can this calculation be done on stock or is it for options only?

You can check to see how long a position has been opened for both stocks and options

If I use the "Exactly" function and that day lands on a holiday or weekend, what happens?

Then the automation will result in a no because the automation will not run on weekends or a holiday.

Is the number of days designator based on just "Trading" days or does it include weekends and holidays?

Calendar days is used when comparing how long a position has been open

Can I lump multiple criteria together in my automation?

Yes, you can do so by using the "and/or" logic for an automation

Related articles

Trade smarter with automation