Hello all!
Hope someone is able to help me on this.
I’m trying to place a buy limit order at the low of current bar when the bar closes, and have the limit order deleted if it’s not filled within the close of the following bar. If limit order is deleted, then repeat the process as long as conditions to buy are met.
Hi there,
A Limit order (and Stop order) will delete themselves at the close of the bar where they initiated. So it is the other way around : you must repeat them (at the same level or an other level) if you want to sustain them.
Does that answer your question ?
Regards,
Peter
Thanks for your reply.
I was not aware of that. Don’t know how I would write the code for this though. Would you be able to help?
YourPrice = Close - 2 // Just an example !
If Not OnMarket then
Buy LotSize Contract at YourPrice Limit // Repeat this each call of your code (hence at each bar).
Endif
Manually it could look like you see below (Koop = Buy).
Thanks a lot!
How do I repeat it at each call?
With the lines of code I showed – this goes automatically. Until Not OnMarket is not true any more. Then the position is there, for you to decide when to close it.
So now you need to learn the PRT language a little (or more); you can search for YouTube tutorials. Like you see in the middle at the bottom (below).
Have fun !