Rules (WL6) => Building Blocks (WL7)
Author: Eugene
Creation Date: 3/28/2021 11:41 AM
profile picture

Eugene

#1
Here's a cheat sheet for matching Rules with Blocks (excluding the obvious ones). The post will be updated as we add new matches.

1. ENTRIES AND EXITS

Basic exits

* Sell (cover) at close - No equivalent, not possible to exit "this bar at close" in Blocks
Workaround: use code based strategy and peek ahead at the next bar

Trailing stops

* Sell (Cover) at ATR based Trailing stop = Sell (Cover) at ATR Stop (Limit), check "Trailing" (required Build 4 and above)
* Sell (Cover) at point (dollar) based Trailing stop = TODO

2. CONDITIONS

Price or Volume Action

* Gap Up/Down = "Indicator % Above/Below Indicator" Condition Block, use "How Many Bars Ago" parameter > 0 (requires WL7 Build 12+). Typically you should set it to "1".

Also, starting from the PowerPack extension's build 8 a Gap condition will be included (Conditions > PowerPack > Gaps and Patterns).

* Price crosses above (below) Price from previous day = Indicator Crosses Indicator, choose a Price (e.g. Close, AverageHL) as both "Indicators"

* Price <= (Highest) Lowest Price is Lookback period = Indicator Compare to Indicator, choose Price (e.g. Close, AverageHL) "is greater (less)..." and Highest (Lowest) as 2nd Indicator

* Price increased (decreased) a consecutive number of bars = Indicator Compare to Indicator, choose a Price (e.g. Close, AverageHL) as both "Indicators" + add Qualifier "For N Consecutive Bars"

* Price increased (decreased) a number of bars within period = Indicator Crosses Indicator, choose a Price (e.g. Close, AverageHL) as both "Indicators" + add Qualifier "N Times within N Bars"

* Price above (below) value = Indicator compare to Value, choose Price (e.g. Close, AverageHL)

* Price is higher (lower) by $ than it was a number of bars ago = Indicator Compare to Value, choose N-period Momentum and Value

* Price is higher (lower) by % than it was a number of bars ago =
1. Either "Indicator % Above/Below Indicator", choose Price for both Indicators
2. or "Indicator Compare to Value", choose N-period ROC and Value

* Price makes a new high (low) within period = Indicator new High/Low

* Price turns up (down) = Indicator turns

* Volume is < X% below (> X% above) SMA = Indicator Compare to Indicator, choose Volume and EnvelopeLower(Upper) indicator with Source = Volume

* {Some Indicator} is Overbought/Oversold - use "Indicator compare to value", greater than / less than, choose a value for OB/OS.

External Symbol

* For "Indicator..." Conditons use "Indicator symbol" as a Qualifier [before build 24]
** Starting from WL7 build 24: use the newly introduced SymbolInd indicator ("External Symbol Indicator")
** Also there is SymbolData indicator.

* For other Blocks and Conditions, drop "Symbol Filter" as a Condition block.


Moving Average

* Trending up/down: Indicator compare to Indicator, choose your moving average as both the indicators, "Greater Than" stands for "Up" and vice versa for "Down", and "How many bars ago" is the Lookback period (choose 1 or greater).


Position-Based

* Current open Position is older than a number of bars?: use the exit block "Sell (Cover) after N Bars" instead

CCI

* CCI Strong Uptrend/Downtrend: use "Indicator Compare to Value" and set the block to "CCI greater than 100" / "CCI less than -100", respectively.





EDITED 06/15/2021: added Gap Up/Down equivalents
EDITED 06/18/2021: added Moving Average equivalents
EDITED 06/24/2021: added "Current open Position is older..."
EDITED 06/29/2021: added "CCI Strong Uptrend/Downtrend"
EDITED 07/04/2021: added "Indicator is Overbought/Oversold"
EDITED 08/22/2021: updated Gap info
EDITED 10/05/2021: added "External Symbol Indicator" info
EDITED 01/23/2022: added SymbolData indicator info
EDITED 05/14/2023: fixed "Price increased (decreased) a consecutive number of bars"
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).