forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Technical Indicators → Gap / Price jump

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 7

Topic: Gap / Price jump

Hello traders!

I have noticed that that some indicators have special conditions to deal with gaps/price jumps (for example: Bollinger Bands, Moving Average, ATR Stop, Better Bollinger Bands):
                        if (High[bar - 1] < previousValue && open > value ||
                        Low[bar - 1] > previousValue && open < value ||
                        Close[bar - 1] < value && open > value ||
                        Close[bar - 1] > value && open < value)
                        tempVal = open;

While other indicators (Ross Hook, Recent Swing High Low, Price Move) with SlotTypes.Open or SlotTypes.Close don't have such special conditions for dealing with gaps.

Are these conditions for dealing with gaps necessary in indicators' code? Why some indicators don't have such conditions?

Re: Gap / Price jump

Very fine technical observation , may be Mr. Popov  or footon could answer these intricate question, because it deals with the logistics and not with the way the indicator is interpreted in a classical form. I am curious to know the answer as well.

Re: Gap / Price jump

Price Move works on a one bar basis. Bar opens, price moves and indicator works on that info, gaps and jumps don't matter.

Ross Hook and the other one are basically price patterns with a defined price/pattern point. One could argue that they might need a gap management code for closing points. Can someone present me a case where it is needed?

Re: Gap / Price jump

footon, just  the basic logic . Great!
There is (to my knowledge) NOT one possible case as you point it out in witch gap management is required for closing points.

5 (edited by Finmod123 2020-04-18 09:46:53)

Re: Gap / Price jump

footon wrote:

Price Move works on a one bar basis. Bar opens, price moves and indicator works on that info, gaps and jumps don't matter.

Ross Hook and the other one are basically price patterns with a defined price/pattern point. One could argue that they might need a gap management code for closing points. Can someone present me a case where it is needed?

Footon, thanks for answer!
I'd like to clarify the situation on the simplest indicator with only Open slot: Price move.
For example, we select "Price move" with: Base price = High, Price move = 10 points, "Enter long after an upward move", UPBV=True

1) What will happen if the current bar opens with gap up at price = High[bar-1] + 15 points? Will the buy order be executed?
2) What will happen if due to broker problems there will be discontinuity in quotes? For example, on the current bar after quote: High[bar-1]+7 points will be quote: High[bar-1] + 13 points. Will the long order be executed?

Re: Gap / Price jump

1) No, the indi sets position opening price values and if market price equalizes with those, then position order is sent out, in this case price starts above and continues to go above.
2) Yes, because price started lower than the position opening value, it made a move upward by the amount defined and therefore order has to be sent out.

This covers the theory I hope smile But these are excellent questions.

Re: Gap / Price jump

The "Price Move" indicator is intended to work based on Open price only. The other Base prices are added for consistency but are not recommended because they do not provide symmetry for long and short trades.

Having into account that the Generator never changes the "Base price", the Price move indicator doesn't need to calculate the entry gap.

We need gap protection for bands calculated on previous bars.

When an indicator is calculated on Open price, it doesn't set UPBV = true.

Because the Price Move indicator is only for entries, it doesn't hurt much if someone uses it based on another Base price. If a gap happens the worst case is to miss an entry. Because it happens rarely and the behaviour is consistent in FSB Pro and MT,  I decided that it is not necessary to make it more complex than needed.

Posts: 7

Pages 1

You must login or register to post a reply

Forex Software → Technical Indicators → Gap / Price jump

Similar topics in this forum