using time to remove orders?

 

Does anyone have a snippet of code that will remove orders based on a certain amount of time passing by? I know orders can have an expiration but I want my EA to remove an order after two bars on the 15 minute chart. Any help would be greatly appreciated!! Daniel


PS: I did try searching the forum and was not successful in finding this code........

 
forexman05 wrote >>

Does anyone have a snippet of code that will remove orders based on a certain amount of time passing by? I know orders can have an expiration but I want my EA to remove an order after two bars on the 15 minute chart. Any help would be greatly appreciated!! Daniel

PS: I did try searching the forum and was not successful in finding this code........

hi

for example

if(orderselect(..........))

{

openprice=timeminute(orderopenprice())

}

timeclose=openprice+30

if(timeclose>=60)

{

timeclose=timeclose-60

}

if(timeminute(timecurrent)==timeclose)

{

orderclose(...........)

...........

 
aminkam:

hi

for example

if(orderselect(..........))

{

openprice=timeminute(orderopenprice())

}

timeclose=openprice+30

if(timeclose>=60)

{

timeclose=timeclose-60

}

if(timeminute(timecurrent)==timeclose)

{

orderclose(...........)

...........

openprice=timeminute(orderopenprice())


So what does this line do then, aminkam?


CB

 
cloudbreaker wrote >>

openprice=timeminute(orderopenprice())

So what does this line do then, aminkam?

CB

hi

oh soryy

openprice=timeminute(orderopentime()) this refer to open minute of position.

A.M

Reason: