Point Change after Close

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #96982 quote
    Darren Nash
    Participant
    New

    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

    #96986 quote
    robertogozzi
    Moderator
    Master

    If 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):

    Buy 1 contract at close + 30 * pipsize Stop
    #96988 quote
    robertogozzi
    Moderator
    Master
    Please update your Country flag in your profile. Thank you.
    #96991 quote
    Darren Nash
    Participant
    New
    Thanks Roberto, in this case, its 4pm sydney time.  And I will update my flag, thanks.
    #96992 quote
    robertogozzi
    Moderator
    Master
    You can save the current price, then place the following order:
    If time = 040000 then
       EntryPrice = close + 30 * pipsize
    Endif
    If close > EntryPrice then
       Buy 1 contract at market
    Endif
    I assume in Sydney it’s 4am now.
    #96995 quote
    doctorntz3
    Participant
    New
    If you want to buy above or below yesterday market close value you can use DClose(1)
    if close >= (DClose(1) + 30) then
    	Buy 1 contract at market
    endif
    Note: In the example above I use 30, but depending on the instrument you are trading that number might be 0.30 Hope this helps
    robertogozzi, Nicolas and Darren Nash thanked this post
    #96997 quote
    Nicolas
    Keymaster
    Master
    Note: 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:
    if close >= (DClose(1) + 30*pipsize) then
    	Buy 1 contract at market
    endif
    #103917 quote
    Darren Nash
    Participant
    New
    Sorry been away.  Thanks for the reply
    #103926 quote
    robertogozzi
    Moderator
    Master
    Please update your Country flag in your profile. Thank you.
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

Point Change after Close


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 8 replies,
has 4 voices, and was last updated by robertogozzi
6 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/23/2019
Status: Active
Attachments: No files
Logo Logo
Loading...