Not logged in
Viewing 5 posts - 1 through 5 (of 5 total)
  • #248916|
    Customer
    3 Posts

    How would I go about adding a check to see what the size of the gap between market close and market open is? If like to be able to detect if the gap is larger than x amount of pips, and add a pt/so according to the size of the gap. The best I’ve figured out how to do is detect if there is a gap, but not how large or small the gap is. Any help creating that rule or pointing me to some documentation that would help would be greatly appreciated. I should note that I would be using the algowizard built into strategyquant

    #248948
    tomas262
    Administrator
    1193 Posts

    Hello,

    using Wizard you can simply do the subtract operation: OpenDaily(0) – CloseDaily(1) and if the price difference is higher than specified value you can do another operation as you wish

    Let me know if any issues with that

    #248949
    Customer
    3 Posts

    So would it look like OpenDaily(x gap pips) – CloseDaily(1) ?

    #248968
    tomas262
    Administrator
    1193 Posts

    Hello,

    the example attached shows how to save the gap size (in pips) into a variable called “gapSizePips” which can be then used to decide what to do next

    Let me know if any questions

    Attachments:
    You must be logged in to view attached files.
    #248971
    Customer
    3 Posts

    Thank you that was exactly what I was looking for.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.