I was wondering how PRT would react to the following situation:
I want to store the date of my first order so I thought that I’d code it this way simply (the idea is that if there’s a position buildup because the market moves in an unfavorable way to my trade, below code stays valid);
1
2
3
4
5
Ifonmarketthen
Datefirstorder=today
elsifnotonmarketthen
Datefirstorder=undefined
endif
But how will PRT react if the order stays pending in the market till the next day?
Is the date defined above not going to change to the current day as the condition “onmarket” is still valid or does PRT keep the date previously set?
To store the date of your first order, considering just before it you were not on market yet (unlike during your position buildup), you could try this logic: