Lookback Period explanation?
Author: danfleysher
Creation Date: 8/17/2017 10:27 PM
profile picture

danfleysher

#1
I'm a bit curious about this parameter.

I have a sell condition with "Price is more than 5% above previous day's Price" and my LookBackPeriod is 3 days. Is the parameter looking back to any day within the 3 days or only the 3rd day back.

i.e. If its Friday, will it sell if price is more than 5% above Thursdays, Wednesdays, and Tuesdays or only Tuesdays?
profile picture

Eugene

#2
This condition from ROC group can be confusing. I recommend that you use "Price is higher by % than it was a number of bars ago" instead. Taking your example, this one will look at Tuesday's price if it's Friday.
profile picture

danfleysher

#3
One more question I was hoping you could answer regarding the OR divider, I'm not sure where to put it.

Below is what my current set up looks like. I want to sell at market when the current open position is older than 15000 bars OR if the price makes a new high within a period AND more than X% above previous day's price. Yet I still see open positions that have 19000 bars. Am I putting it in the wrong place?

Sell at Market
-Current open position is older than a number of bars (15,000)
-OR Divider
-Price makes a new high within period
-Price is more than X% above previous day's price.

profile picture

Eugene

#4
QUOTE:
-Current open position is older than a number of bars (15,000)

It's true when the most recent open Position is older than 15000 bars which may not always be true in strategies taking multiple positions. Realizing that this rule is confusing, we created a more straightforward one to extend WLP:

* Active Position is older than a number of bars
* Active Position is not older than a number of bars

You can find it in Community Rules library after verifying your WLP entitlement (please create a support ticket):

Community.Rules
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).