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(...........)
...........
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

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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........