variable to use as expiration date
-
Hi.
in my strategy I place several pending orders in the grid,
example:
I buy pending orders in grid. (I set expiration 5 days)
when time passes, (for example 3 hours) according to my ea conditions,
I buy pending orders in grid. (the block is set to expire in 5 days).
I want the expiration date to be the date of the first purchase order in the grid, for all the grids I buy.
any idea how to do it?
thanks -
@cesardefez Not sure I fully understand wjat you mean. Do you need the date the first trade is open before the 5 days period is reached? Why not simply shortening the expiration period?
-
I put the orders pending in the grid.
When I put the first grid I can put an expiration date, 5 days, perfect. We are at day 1, day 5 will close.
Doubt: Do you close the pending orders that remain to be opened, or also the open ones of this grid? Do you close all of them, open and pending?
Let's suppose that the next day, the 2nd day, another grid opens for me, expiration 5 days. This second grid will close on day 6 (5 + 1 since it was launched a day later).
I want to make sure that all the grids that I open, from the 1st, close with the expiration of the 1st grid.
that's why I need a variable that is updated with my first grid, and use the same value for the following ones.
I hope I have explained myself -
@cesardefez Can you please share the link to your project?