What I am trying to accomplish is using either number of ticks gained or a dollar amount to govern how long the system is active.
To gather the number of ticks gained I wanted to do ABS(TR_Fill - Exit Price) and aggregate the output to a V# variable
For example, if I set a V#1 variable to 60 (ticks), then as each trade closes it adds the output to a V#2 variable
Once the V#2 is equal to or greater than V#1 - stop the system
My question is how can I access the Exit Price of a trade?
I don't see a token for Exit Price, only for predetermined stops or limits - which is where you want to get out but that may not be where you get out -
The system will exit out at market when criteria is met
I see that the Portfolio Object has a column for Exit Price, Report from Portfolio and Trading Order Desk have Exit Price of a trade
I see there is a PFO token but I can't find what output it offers
On the flip side, using a dollar amount to govern - I see there is a gain loss token GL
Do I set a V variable to say 300 and if GL is equal to or greater than V - shut down (meaning at the top of system code would be an if statement to check if GL >= V#, if no, enter trade if criteria met, else, no trade)
Please advise if there is access to portfolio data or suggest a control mechanism of this nature
Thanks
PT