Flatafter a day and a time
Forums › ProRealTime English forum › ProOrder support › Flatafter a day and a time
- This topic has 5 replies, 2 voices, and was last updated 5 years ago by
Vonasi.
-
-
04/05/2020 at 12:13 PM #124704
Dear all,
I’m new to the product and the forum. I enjoy the product very much so far and got a lot of good knowledge by searching around the forum and get answers without starting a new thread.
One thing I’ve tried hard to search for an answer but no luck so far is program “flatafter” after not only a time but a particular day as well.
My scenario is I want to run my system on ASX 200, however the market closes around 8am on every Saturday, so I want to close all position before 7am on every Saturday so I won’t be exposed to any risk over the weekend.
What would be the code for this?
Many thanks!
B
04/05/2020 at 12:44 PM #124705Mr Bear – Welcome to the forums. You posted your topic in the wrong forum. ProOrder is for strategy related questions and ProRealTime Platform Support is for platform related issues. I have moved your topic to the correct forum but please be more careful with any future topics.
04/05/2020 at 12:49 PM #12470604/05/2020 at 1:12 PM #124708Like this:
1234if onmarket and dayofweek = 6 and time >= 070000 thensell at marketexitshort at marketendif
Thank you Vonasi for this clear alternative! however, if my strategy is triggered for an event at 07:05, how do I make sure no position will be created between 0700 and 0800?04/05/2020 at 1:40 PM #124710There are some simple rules that everyone using the forums is expected to follow. Your post has broken one or more of these rules.
The forum rules are as follows. I have highlighted in bold the rule/rules that you have not followed:
- 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.- Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
- Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
- 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.
- Be careful when quoting others in your posts. Only use the quote option when you need to highlight a particular bit of text that you are referring to or to highlight that you are replying to a particular member if there are several involved in a conversation. Do not include large amounts of code in your quotes. Just highlight the text you want to quote and then click on ‘Quote’.
- Give your topic a meaningful title. Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.
- Do not include personal information such as email addresses or telephone numbers in your posts. If you would like to contact another forum member directly outside of the forums then contact the forums administrator via ‘Contact Us’ and they will pass your details on to the member that you wish to contact.
- Always be polite and courteous to others.
- Have fun.
I have edited your post where required. Please ensure that your future posts meet these few simple forum rules. 🙂
04/05/2020 at 1:44 PM #124711Like this:
12345678910tradeoff = dayofweek = 6 and time >= 070000if (your entry conditions) and not tradeoff thenbuy 1 contract at marketendifif onmarket and dayofweek = 6 and time >= 070000 thensell at marketexitshort at marketendif1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on