Closing Pending Orders
-
Is it possible to set expiration by n candles?
I currently have a loop counter to close pending but am wondering if there is a much easier way.Thanks
-
@yoloyacht Yes, you can do this:

-
@l-andorrà Oops I forgot to mention I'm using Renko bars, wouldn't that not work since Renko isn't time based?
-
@yoloyacht Yes, it would work because each renko bars are superposed to 'normal' bars.
-
@l-andorrà Does this Means If I have to open a Trade at a Specific Second of Every Minute, I can Do So and at a Particular Second of same minute I have to Close that trade. How can I make that Work... I am not getting good Idea how to use Init, Deinit, timer, Chart, tick pages etc. I am only using tick always...
How can I open trade at 24th Second every minute and End it on 50th Second of same Minute.
-
@er-arpit09 That's a completely different thing, I'm afraid. Oening and closing trades at a specific time needs the 'on Timer' tab, not the 'on tick' one because you cannot know if there will be a tick at that specific second of that minute. Definitely you need to work on the 'on Timer' tab.
-
@l-andorrà does that mean 1 renko bar = 1 hour? In terms of expiring the trade
-
@yoloyacht No, your renko bars will coincide with the timeframe your are working on now. If you are working on the M15 timeframe, each renko bar you will see will coindice with a 'normal' M15 bar. If you chaneg to H1, same will happen.
-
I'm using an offline chart though. It isn't working for me.
For example, My offline timeframe is M3, I want the order to expire in 3 candles, so i set the expiry to 9 minutes.
It still doesn't expire past that -
@l-andorrà I'm using an offline chart though. It isn't working for me.
For example, My offline timeframe is M3, I want the order to expire in 3 candles, so i set the expiry to 9 minutes.
It still doesn't expire past that -
@yoloyacht Can you please share your project?
-
@l-andorrà https://fxdreema.com/shared/0wi4HFcme
pending orders on the left side -
@yoloyacht Change the expiration mode from 'specified time' to 'Custom'. Then use your 'TIME' constant there at the seconds space.