Is it possible to distinguish between the following 4 types of changes in position?
Long entry
Long exit (on stop)
Short entry
Short exit (on stp)
In an algo that checks for both long entry’s and short entry’s, I want only to enter a new long at a HIGHER price than the previous long entry, and a new short at a LOWER price than the previous short entry.
This may or may not be higher/lower than the previous TRADE as the last trade could be an exit on stop which in effect I want to ignore
You can retrieve the open price of each previous trade with TRADEPRICE instruction. This way you can decide to take position higher or lower than this price.
Yes – but the question is, how do I distinguish between the different types of trades, as described above. I guess from your answer this is not possible?
What happens if the sequence of trades is 1) sell, 2) sell, 3) buy and 4) sell stopped out. I then want to sell more. How do I isolate the last sell price – tradeprice(3)? – and distinguish it from tradeprice(2) – the buy – and tradeprice(1) – the sell stopped out?
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue