Point Change after Close
Forums › ProRealTime English forum › ProOrder support › Point Change after Close
- This topic has 8 replies, 4 voices, and was last updated 6 years ago by
robertogozzi.
-
-
04/23/2019 at 12:19 PM #96982
Hi All,
I’m new to the forum.
I want to write logic where a trade executes based off points change from close price – i.e. if the ASX is 30 points up after the close, execute (along with other params).
Can someone help/point me in the right direction to code this?
Thanks
Darren
04/23/2019 at 12:55 PM #96986If you want to place orders at market then you have to tell us what CLOSE you want to use as a reference, yesterday, 9am or which one?
If you want to place pending orders, then you can write (long trade):
1Buy 1 contract at close + 30 * pipsize Stop04/23/2019 at 12:58 PM #96988Please update your Country flag in your profile.
Thank you.
04/23/2019 at 1:12 PM #96991Thanks Roberto, in this case, its 4pm sydney time. And I will update my flag, thanks.
04/23/2019 at 1:17 PM #96992You can save the current price, then place the following order:
123456If time = 040000 thenEntryPrice = close + 30 * pipsizeEndifIf close > EntryPrice thenBuy 1 contract at marketEndifI assume in Sydney it’s 4am now.
04/23/2019 at 1:57 PM #96995If you want to buy above or below yesterday market close value you can use DClose(1)
123if close >= (DClose(1) + 30) thenBuy 1 contract at marketendifNote: In the example above I use 30, but depending on the instrument you are trading that number might be 0.30
Hope this helps
3 users thanked author for this post.
04/23/2019 at 2:33 PM #96997Note: In the example above I use 30, but depending on the instrument you are trading that number might be 0.30
good, we could also make it universal by multiplying 30 with the pipsize value of the current instrument:
123if close >= (DClose(1) + 30*pipsize) thenBuy 1 contract at marketendif08/01/2019 at 2:16 AM #103917Sorry been away. Thanks for the reply
08/01/2019 at 7:24 AM #103926Please update your Country flag in your profile.
Thank you.
-
AuthorPosts
Find exclusive trading pro-tools on