use time as secinds for expiry
formulation of secinds time for midnite next busyness day and use it as epiry time in OrderSend(), ok.
formulation of secinds time for midnite next busyness day and use it as epiry time in OrderSend(), ok.
Example:
int stopHour=0; int StopMinute=0; datetime [b]stopTime[/b]=StrToTime(StringConcatenate(Year(),".",Month(),".",Day()+1," ",stopHour,":",StopMinute)); int lifeTime=stopTime-TimeCurrent(); OrderSend(Symbol(),OP_BUYLIMIT,0.1,Ask-50*Point,Slippage.0,0,StringConcatenate("pending order for ",lifeTime," seconds"),0,[b]stopTime[/b],Blue);
Thanks Rosh,
Day()+1 from your example above gives me the current date somehow.
Day()+1 from your example above gives me the current date somehow.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I need to cancel all outstanding orders at midnight next business day.