I would like to place a sell order for a specific trading day, it should be a time-based sell order at the end of the trade. The background is a simple seasonal strategy.
The order is to be combined with a stop loss and take profit, i.e. the order will be closed beforehand when the price levels are touched.
You wrote “it should be a time-based sell order at the end of the trade” but you probably meant “it should be a time-based sell order to end the trade“, didn’t you?
This is the code (as to my interpretation):
1
2
3
4
IFOpenDayOfTheWeek=4ANDTime=170000THEN//close at 17:00 on Thursday
SELL....
//or SELLSHORT...
ENDIF
You may remove the TIME condition if you don’t need or if you are using a Daily TF or any TF whose bar doesn’t close at THAT time.
0=Sun, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri (6=Sat for instruments that can be traded on Saturday).
Do not double post. Ask your question only once and only in one forum. All double posts will be deleted anyway so posting the same question multiple times will just be wasting your own time and will not get you an answer any quicker. Double posting just creates confusion in the forums. .
Post your topic in the correct forum: _ ProRealTime Platform Support: only platform related issues.
_ ProOrder: only strategy topics.
_ ProBuilder: only indicator topics.
_ ProScreener: only screener topics
_ General Discussion: any other topics.
_ Welcome New Members: for new forum members to introduce themselves.
The double post I deleted was in a wrong support forum.
You wrote “it should be a time-based sell order at the end of the trade” but you probably meant “it should be a time-based sell order to end the trade“, didn’t you?
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.