Market open gap size?
6 replies
Southernpitbull
5 years ago #248916
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

tomas262
5 years ago #248948
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
Southernpitbull
5 years ago #248949
So would it look like OpenDaily(x gap pips) – CloseDaily(1) ?

tomas262
5 years ago #248968
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
Southernpitbull
5 years ago #248971
Thank you that was exactly what I was looking for.
WELLINGTON QUINTAO
8 months ago #287608
Hello Tomas
After creating the variable “gapSizePips” as per the attached example, how do I add it to the LongEntrySignal and the ShortEntrySignal
For example, if “gapSizePips >= 50
and OpenD [0] < CloseD [1]
Send a long signal
For example, if “gapSizePips >= 50
and CloseD [1] < OpenD [0]
Send a short signal
Would you have a template with this information?
Thank you for attention!

tomas262
8 months ago #287711
Simply setup a new tab (IF-THEN) and add a new condition
if “gapSizePips >= 50″ Enter At Market …
Or setup a new strategy template and copy the gap formula into a new tab there
Viewing 6 replies - 1 through 6 (of 6 total)