{"id":5454,"date":"2024-07-23T13:05:36","date_gmt":"2024-07-23T12:05:36","guid":{"rendered":"https:\/\/pjsmith.me.uk\/?post_type=docs&#038;p=5454"},"modified":"2026-05-16T10:19:12","modified_gmt":"2026-05-16T09:19:12","slug":"algo-bars","status":"publish","type":"docs","link":"https:\/\/pjsmith.me.uk\/index.php\/docs\/pjsprofilebars\/general-feature-notes\/algo-bars\/","title":{"rendered":"Algo bars"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Algo bars are an innovative feature that allows you to write your own alerts and signals, without coding, compiling, etc.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Below, you can see one set of example conditions for a signal<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"589\" height=\"403\" data-attachment-id=\"5455\" data-permalink=\"https:\/\/pjsmith.me.uk\/index.php\/docs\/pjsprofilebars\/general-feature-notes\/algo-bars\/image-18\/\" data-orig-file=\"https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-3.png\" data-orig-size=\"589,403\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-3.png\" src=\"https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-3.png\" alt=\"\" class=\"wp-image-5455\" srcset=\"https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-3.png 589w, https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-3-300x205.png 300w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Enable<\/strong><br \/>Globally enables or disables the signal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The chart marker option places the text in the Signal name field onto the chart as a native NinjaTrader text object (for interaction with third-party tools), above or below the bar, as set in the options.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Condition #x<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Conditions are the criteria you want to match for the signal to be generated. All signals must be true for the event to trigger.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Comparison conditions typically consist of 3 or more parts (depending on the comparison): a variable name or value, a comparison operator, and another variable name or value. There must be one or more spaces between each part. For example:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Comparison operators<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The full list of supported comparison operators is: <code>&gt;<\/code>, <code>&lt;<\/code>, <code>&gt;=<\/code>, <code>&lt;=<\/code>, <code>==<\/code>, <code>!=<\/code>, and <code>~~<\/code>. The <code>~~<\/code> operator means &#8220;close enough&#8221; \u2014 it performs an approximate rather than exact match (within 20% of the right-hand value).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Logical operators<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>&amp;&amp;<\/code> (AND) and <code>||<\/code> (OR) logical comparators are supported to combine multiple conditions. With <code>&amp;&amp;<\/code>, all joined conditions must be true. With <code>||<\/code>, at least one of the joined conditions must be true.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Arithmetic operations<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8217;26 release added support for simple arithmetic: <code>+<\/code>, <code>-<\/code>, <code>*<\/code>, and <code>\/<\/code>. These follow standard order-of-operations rules (multiplication and division before addition and subtraction). For example, <code>CLOSE &gt; OPEN + 5<\/code> evaluates as <code>CLOSE &gt; (OPEN + 5)<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Parentheses for evaluation order<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Parentheses can be used to force a specific evaluation order or simply for clarity:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Important notes on expression parsing<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The expression evaluator processes parenthesised sub-expressions <em>before<\/em> evaluating comparisons. Within parentheses, the content is evaluated as arithmetic (not a comparison). Outside parentheses, comparisons and logical operators work normally.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Mixed expressions caveat<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The parser handles either pure arithmetic or pure comparisons within any given expression segment. An expression like <code>CLOSE &gt; OPEN - 100<\/code> may not evaluate as expected because the parser does not handle interleaved comparison and arithmetic operators in a single flat expression. To be safe, always use parentheses around each logical sub-expression:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Formula examples<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Below are practical formula patterns you can copy directly into your conditions. Each example includes an explanation of what it detects.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Trend direction<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>CLOSE &gt; OPEN<\/code><br \/>&nbsp;\u2014 Up bar \u2014 closes above open (bullish candle)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Down bar detection<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>CLOSE &lt; OPEN<\/code><br \/>&nbsp;\u2014 Down bar \u2014 closes below open (bearish candle)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Strong body relative range<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>(CLOSE - OPEN) \/ (HIGH - LOW) &gt; 0.8<\/code><br \/>&nbsp;\u2014 Bar body is more than 80% of total range (strong directional move, low wicks)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Close near high<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>CLOSE &gt; HIGH * 0.995<\/code><br \/>&nbsp;\u2014 Closes within 0.5% of the bar high (near-top close = bullish strength)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Volume spike vs average<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>VOLUME &gt; VOLUMEB0 * 3<\/code><br \/>&nbsp;\u2014 Current volume is more than 3x bucket-0 reference volume<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Delta dominance<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>DELTA \/ VOLUME &gt; 0.5<\/code><br \/>&nbsp;\u2014 Net delta exceeds half the bar&#8217;s total volume (aggressive one-sided flow)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Profile level breach \u2014 above VAH<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>CLOSE &gt; SESSIONVAH<\/code><br \/>&nbsp;\u2014 Price closed above session Value Area High (breakout from value range)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Profile level breach \u2014 below VAL<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>CLOSE &lt; SESSIONVAL<\/code><br \/>&nbsp;\u2014 Price closed below session Value Area Low (breakdown from value range)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Typical price vs VWAP<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>(HIGH + LOW + CLOSE) \/ 3 &gt; VWAP<\/code><br \/>&nbsp;\u2014 Bar&#8217;s typical price above VWAP (bullish relative to fair value)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Wick rejection at high<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>CLOSE - OPEN &lt; (HIGH - CLOSE) * 2<\/code><br \/>&nbsp;\u2014 Long upper wick on up bar \u2014 possible rejection of higher prices<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Multiple condition with AND<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>(CLOSE &gt; OPEN) &amp;&amp; VOLUME &gt; 500<\/code><br \/>&nbsp;\u2014 Up bar AND volume above 500 (both must be true for signal to fire)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">OR logic \u2014 either side<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>(CLOSE &gt; OPEN) || HASBULLISHSWEEP<\/code><br \/>&nbsp;\u2014 Either an up bar OR a bullish sweep occurred (one must be true)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Combined trend + volume confirmation<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>(CLOSE &gt; OPEN) &amp;&amp; VOLUME &gt; DELTACUM * 0.1<\/code><br \/>&nbsp;\u2014 Up bar AND volume exceeds 10% of cumulative delta (trend with flow backing it)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Approximate match with ~~<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>CLOSE ~~ VWAPAVG<\/code><br \/>&nbsp;\u2014 Close is within ~20% of average VWAP (close enough to fair value zone)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Bar range expansion<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>(HIGH - LOW) &gt; ((HIGH[1] + LOW[1]) \/ 2 - (LOW[1])) * 1.5<\/code><br \/>&nbsp;\u2014 Current bar&#8217;s high-low is larger than 1.5x previous typical range (expansion day)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Bracketing POC with volume filter<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>(CLOSE &gt; VPOC || CLOSE &lt; VPOC) &amp;&amp; HASBULLISHALGOBARS == 0<\/code><br \/>&nbsp;\u2014 Price not at POC AND no bullish algo bar present \u2014 avoids false signals at equilibrium<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Variable names \u2014 quick-scan list<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A complete alphabetical reference below. Hover or click the categories at the end of this page for more detailed descriptions grouped by topic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ALGOBARSCUSTOMVALUE1 \u2014 Custom value configurable via the AlgoBars UI<br \/><br \/>COTDELTAHIGH \u2014 Commitment of Traders delta high reference level<br \/><br \/>COTDELTALOW \u2014 Commitment of Traders delta low reference level<br \/><br \/>CLOSE \u2014 Current bar close price<br \/><br \/>DACLASSIFIERCUSTOMMATCH0 \u2014 Custom classifier match score (DA only)<br \/><br \/>DAEOC0 \u2014 Expected outcome current value<br \/><br \/>DAEOC1 \u2014 Smoothed expected outcome score<br \/><br \/>DAEOCF \u2014 Far-future expected outcome score<br \/><br \/>DAMARKETBIAS \u2014 Market bias from ML analysis (DA only)<br \/><br \/>DATRADEBIAS \u2014 Trade bias: 0 = neutral, positive\/negative for directional lean (DA only)<br \/><br \/>DATRADEBIASCONFIDENCE \u2014 Confidence level of the trade bias prediction as a percentage, 0 to 100 (DA only)<br \/><br \/>DARRLONG \u2014 ML long classification score (DA only)<br \/><br \/>DARRSHORT \u2014 ML short classification score (DA only)<br \/><br \/>DELTAB0 \u2014 Delta for volume bucket 0 (requires bucketing enabled)<br \/><br \/>DELTAB1 \u2014 Delta for volume bucket 1 (requires bucketing enabled)<br \/><br \/>DELTAB2 \u2014 Delta for volume bucket 2 (requires bucketing enabled)<br \/><br \/>DELTAB3 \u2014 Delta for volume bucket 3 (requires bucketing enabled)<br \/><br \/>DELTAB4 \u2014 Delta for volume bucket 4 (requires bucketing enabled)<br \/><br \/>DELTACUM \u2014 Cumulative delta across multiple bars (if multibar mode is enabled, otherwise 0)<br \/><br \/>DELTADIVATHIGHLOW \u2014 Delta divergence detected at bar high or low<br \/><br \/>DELTAIMBALANCEPERCENT \u2014 Combined imbalance delta percentage<br \/><br \/>DELTA \u2014 Current bar delta<br \/><br \/>DELTAPERCENT \u2014 Delta as a percentage of total bar volume<br \/><br \/>DELTARANK \u2014 Delta rank percentile<br \/><br \/>DPOC \u2014 Delta at the bar&#8217;s POC (Point of Control)<br \/><br \/>DURATIONMS \u2014 Bar duration in milliseconds<br \/><br \/>DURATIONS \u2014 Bar duration in seconds<br \/><br \/>HASBEARISHABSORPTION \u2014 Bearish absorption detected on this bar<br \/><br \/>HASBEARISHALGOBARS \u2014 Bearish algo bar detected on this bar<br \/><br \/>HASBEARISHABOVEBELOWPOC \u2014 Above\/below POC signal (bearish)<br \/><br \/>HASBEARISHDELTACHANGE \u2014 Delta change signal (bearish)<br \/><br \/>HASBEARISHDELTADIVATHIGHLOW \u2014 Delta divergence at bar high\/low (bearish)<br \/><br \/>HASBEARISHDELTADIV \u2014 Bearish delta divergence detected on this bar<br \/><br \/>HASBEARISHENSDA \u2014 ENS DA signal (bearish, requires Data Analytics setup)<br \/><br \/>HASBEARISHFADINGDELTAMOMENTUM \u2014 Bearish fading delta momentum detected<br \/><br \/>HASBEARISHHIGHPROBABILITYDA \u2014 High probability DA setup (bearish, requires Data Analytics setup)<br \/><br \/>HASBEARISHMULTIPLEIMBALANCE \u2014 Multiple imbalance on the bearish side<br \/><br \/>HASBEARISHPORTFOLIO \u2014 Bearish portfolio signal detected (requires Data Analytics setup)<br \/><br \/>HASBEARISHPROFILEPATTERN \u2014 Original profile pattern sell signal<br \/><br \/>HASBEARISHRISINGDELTAMOMENTUM \u2014 Rising delta momentum (bearish)<br \/><br \/>HASBEARISHSTACKEDIMBALANCE \u2014 Stacked imbalance on the bearish side<br \/><br \/>HASBEARISHSWEEP \u2014 Bearish sweep detected on this bar<br \/><br \/>HASBEARISHVOLUMESEQUENCING \u2014 Bearish volume sequencing detected<br \/><br \/>HASBULLISHABSORPTION \u2014 Bullish absorption detected on this bar<br \/><br \/>HASBULLISHALGOBARS \u2014 Bullish algo bar detected on this bar<br \/><br \/>HASBULLISHABOVEBELOWPOC \u2014 Above\/below POC signal (bullish)<br \/><br \/>HASBULLISHDELTACHANGE \u2014 Delta change signal (bullish)<br \/><br \/>HASBULLISHDELTADIVATHIGHLOW \u2014 Delta divergence at bar high\/low (bullish)<br \/><br \/>HASBULLISHDELTADIV \u2014 Bullish delta divergence detected on this bar<br \/><br \/>HASBULLISHENSDA \u2014 ENS DA signal (bullish, requires Data Analytics setup)<br \/><br \/>HASBULLISHFADINGDELTAMOMENTUM \u2014 Bullish fading delta momentum detected<br \/><br \/>HASBULLISHHIGHPROBABILITYDA \u2014 High probability DA setup (bullish, requires Data Analytics setup)<br \/><br \/>HASBULLISHMULTIPLEIMBALANCE \u2014 Multiple imbalance on the bullish side<br \/><br \/>HASBULLISHPORTFOLIO \u2014 Bullish portfolio signal detected (requires Data Analytics setup)<br \/><br \/>HASBULLISHPROFILEPATTERN \u2014 Original profile pattern buy signal<br \/><br \/>HASBULLISHRISINGDELTAMOMENTUM \u2014 Rising delta momentum (bullish)<br \/><br \/>HASBULLISHSTACKEDIMBALANCE \u2014 Stacked imbalance on the bullish side<br \/><br \/>HASBULLISHSWEEP \u2014 Bullish sweep detected on this bar<br \/><br \/>HASBULLISHVOLUMESEQUENCING \u2014 Bullish volume sequencing detected<br \/><br \/>HASIMBALANCEDN \u2014 Downward imbalance present (returns 1 or 0)<br \/><br \/>HASIMBALANCEUP \u2014 Upward imbalance present (returns 1 or 0)<br \/><br \/>HIGH \u2014 Current bar high price<br \/><br \/>IMBALANCEDNPERCENT \u2014 Downward imbalance as a percentage of total volume<br \/><br \/>IMBALANCEDNVOLUME \u2014 Total downward imbalance volume on the bar<br \/><br \/>IMBALANCEUPPERCENT \u2014 Upward imbalance as a percentage of total volume<br \/><br \/>IMBALANCEUPVOLUME \u2014 Total upward imbalance volume on the bar<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">HASTRAPPEDSELLERS \u2014 Algo detected trapped sellers within the lookback period<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">HASTRAPPEDBUYERS \u2014 Algo detected trapped buyers within the lookback period<br \/><br \/>LOW \u2014 Current bar low price<br \/><br \/>MAXDELTAATPRICE \u2014 The maximum delta at any single price within this bar<br \/><br \/>OBV \u2014 On-Balance Volume for this bar (bar-level OBV minus its average)<br \/><br \/>OPEN \u2014 Current bar open price<br \/><br \/>SIGNALSUM \u2014 Sum of signals triggered on this bar. Bearish = -1, bullish = +1<br \/><br \/>TAILSIZE \u2014 Size of the bar tail in points (low wick on up-close bars, high wick on down-close bars)<br \/><br \/>TRMODE \u2014 Trend mode: 1 = trend, 0 = regression<br \/><br \/>TREND1 \u2014 Slope value from the trend indicator (requires enabled)<br \/><br \/>TREND2 \u2014 Second slope value from the trend indicator (requires enabled)<br \/><br \/>TREND3 \u2014 Third slope value from the trend indicator (requires enabled)<br \/><br \/>VAH \u2014 Bar&#8217;s Value Area High<br \/><br \/>VAL \u2014 Bar&#8217;s Value Area Low<br \/><br \/>VOLUME \u2014 Current bar volume<br \/><br \/>VOLUMEB0 \u2014 Volume for bucket 0 (requires bucketing enabled)<br \/><br \/>VOLUMEB1 \u2014 Volume for bucket 1 (requires bucketing enabled)<br \/><br \/>VOLUMEB2 \u2014 Volume for bucket 2 (requires bucketing enabled)<br \/><br \/>VOLUMEB3 \u2014 Volume for bucket 3 (requires bucketing enabled)<br \/><br \/>VOLUMEB4 \u2014 Volume for bucket 4 (requires bucketing enabled)<br \/><br \/>VPOC \u2014 Bar&#8217;s POC (Point of Control)<br \/><br \/>VWAP \u2014 Bar&#8217;s VWAP value<br \/><br \/>VWAPAVG \u2014 Average VWAP across bars<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Variable names by category<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For reference, variables are also grouped below. The quick-scan list above has everything in one place; the categories here provide optional additional context.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Price and Volume Data<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">CLOSE \u2014 Current bar close price\nHIGH \u2014 Current bar high price\nLOW \u2014 Current bar low price\nOPEN \u2014 Current bar open price\nVOLUME \u2014 Current bar volume\nVWAP \u2014 Bar&#8217;s VWAP value\nVWAPAVG \u2014 Average VWAP across bars<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Delta and Order Flow<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">DELTA \u2014 Current bar delta\nDELTACUM \u2014 Cumulative delta across multiple bars (if multibar mode is enabled, otherwise 0)\nDELTAB0 through DELTAB4 \u2014 Delta values for each of the 5 volume buckets (requires bucketing to be enabled)\nDELTARANK \u2014 Delta rank percentile\nDELTAPERCENT \u2014 Delta as a percentage of total bar volume\nDELTAIMBALANCEPERCENT \u2014 Combined imbalance delta percentage<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Volume Buckets<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">VOLUMEB0 through VOLUMEB4 \u2014 Volume for each of the 5 buckets (requires bucketing to be enabled)\nIMBALANCEUPVOLUME \u2014 Total upward imbalance volume on the bar\nIMBALANCEDNVOLUME \u2014 Total downward imbalance volume on the bar\nIMBALANCEUPPERCENT \u2014 Upward imbalance as a percentage of total volume\nIMBALANCEDNPERCENT \u2014 Downward imbalance as a percentage of total volume<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Session and Profile Levels<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">SESSIONPOC \u2014 Session Point of Control\nSESSIONVAH \u2014 Session Value Area High\nSESSIONVAL \u2014 Session Value Area Low\nSESSIONVWAP \u2014 Session VWAP\nVPOC \u2014 Bar&#8217;s POC (Point of Control)\nVAH \u2014 Bar&#8217;s Value Area High\nVAL \u2014 Bar&#8217;s Value Area Low\nDPOC \u2014 Delta at the bar&#8217;s POC<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Other Market Data<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">TAILSIZE \u2014 Size of the bar tail in points (low wick on up-close bars, high wick on down-close bars)\nSIGNALSUM \u2014 Sum of signals triggered on this bar. Bearish signals have a value of -1, bullish +1\nCOTDELTAHIGH \u2014 Commitment of Traders delta high reference level\nCOTDELTALOW \u2014 Commitment of Traders delta low reference level\nDURATIONS \u2014 Bar duration in seconds\nDURATIONMS \u2014 Bar duration in milliseconds\nOBV \u2014 On-Balance Volume for the current bar (bar-level OBV minus its average)\nTRMODE \u2014 Trend mode setting: 1 = trend, 0 = regression\nALGOBARSCUSTOMVALUE1 \u2014 Custom value configurable via the AlgoBars UI<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Trend and ML Indicators<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">TREND1 through TREND3 \u2014 Slope values from the trend indicator (requires enabled)\nDARRLONG \u2014 Machine learning long score\nDARRSHORT \u2014 Machine learning short score<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Indexed variables (historical bar lookup)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The following variables support historical lookup using <code>[x]<\/code> notation, where x is bars ago. For example, HIGH[2] returns the high price two bars back:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">HIGH[x], LOW[x], OPEN[x], CLOSE[x] &#8212; OHLC prices VOLUME[x] &#8212; Volume DELTA[x] &#8212; Delta OBV[x] &#8212; On-Balance Volume DELTARANK[x] &#8212; Delta rank VOLRANK[x] &#8212; Volume rank VPOC[x] &#8212; Point of Control PLOT[plotname[index]] &#8212; See below &#8212; DELTAIMBALANCEPERCENT[x] &#8212; Delta imbalance percent<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PLOT[plotname[index]] \u2014 Third-party indicator values<\/h3>\n\n\n<p>The <code>PLOT[name[barsAgo]]<\/code> syntax allows you to query the value of any exposed plot from any other indicator on the same chart. This is useful for comparing your profile bars data against moving averages, oscillators, or custom indicators.<br \/>\nSyntax: PLOT[plotname[barsAgo]]where:<\/p>\n<ul>\n<li><strong>name<\/strong> &mdash; the exact name of a plot from an indicator on the chart (case-sensitive)<\/li>\n<li><strong>barsAgo<\/strong> &mdash; how many bars back to look (0 = current bar, 1 = previous bar, etc.)<\/li>\n<\/ul>\n\n\n<p class=\"wp-block-paragraph\">Examples:<br \/>PLOT[EMA[0]] \u2014 Value of the EMA plot on the current bar<br \/>PLOT[RSI[1]] \u2014 RSI value from one bar ago<br \/>PLOT[MACD[2]] \u2014 MACD value from two bars ago<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Important notes for PLOT[]:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><ul>\n<li>The indicator must be present on <strong>the same chart<\/strong> as pjsProfileBars.<\/li>\n<li>You need to know the exact plot name. In NinjaTrader, plots are usually named when you add them (e.g., &#8220;EMA&#8221;, &#8220;RSI&#8221;, or custom names).<\/li>\n<li>NinjaTrader does not guarantee the order in which indicators update on a chart. If an indicator has not yet calculated its current bar value at the time pjsProfileBars evaluates conditions, it may return stale data.<\/li><\/ul><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"533\" height=\"118\" data-attachment-id=\"7248\" data-permalink=\"https:\/\/pjsmith.me.uk\/index.php\/docs\/pjsprofilebars\/general-feature-notes\/algo-bars\/image-60\/\" data-orig-file=\"https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-4.png\" data-orig-size=\"533,118\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-4.png\" src=\"https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-4.png\" alt=\"\" class=\"wp-image-7248\" srcset=\"https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-4.png 533w, https:\/\/pjsmith.me.uk\/wp-content\/uploads\/2024\/07\/image-4-300x66.png 300w\" sizes=\"auto, (max-width: 533px) 100vw, 533px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Signal variables<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>The following variables are available on bars where signals have been detected. They return <code>1<\/code> if the signal condition was met, or <code>0<\/code> otherwise.<\/em><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Imbalance Signals<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">HASBULLISHSWEEP \u2014 Bullish sweep detected\nHASBEARISHSWEEP \u2014 Bearish sweep detected\nHASBULLISHMULTIPLEIMBALANCE \u2014 Multiple imbalance on the bullish side\nHASBEARISHMULTIPLEIMBALANCE \u2014 Multiple imbalance on the bearish side\nHASBULLISHSTACKEDIMBALANCE \u2014 Stacked imbalance (bullish)\nHASBEARISHSTACKEDIMBALANCE \u2014 Stacked imbalance (bearish)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Algo Bar Signals<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">HASBULLISHALGOBARS \u2014 Bullish algo bar detected\nHASBEARISHALGOBARS \u2014 Bearish algo bar detected<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Volume and Sequence Signals<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">HASBULLISHVOLUMESEQUENCING \u2014 Bullish volume sequencing\nHASBEARISHVOLUMESEQUENCING \u2014 Bearish volume sequencing<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Divergence Signals<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">HASBULLISHDELTADIV \u2014 Bullish delta divergence\nHASBEARISHDELTADIV \u2014 Bearish delta divergence\nHASBULLISHDELTADIVATHIGHLOW \u2014 Delta divergence at bar high\/low (bullish)\nHASBEARISHDELTADIVATHIGHLOW \u2014 Delta divergence at bar high\/low (bearish)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Momentum and Trend Signals<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">HASBULLISHFADINGDELTAMOMENTUM \u2014 Bullish fading delta momentum\nHASBEARISHFADINGDELTAMOMENTUM \u2014 Bearish fading delta momentum\nHASBULLISHRISINGDELTAMOMENTUM \u2014 Rising delta momentum (bullish)\nHASBEARISHRISINGDELTAMOMENTUM \u2014 Rising delta momentum (bearish)\nHASBULLISHDELTACHANGE \u2014 Delta change signal (bullish)\nHASBEARISHDELTACHANGE \u2014 Delta change signal (bearish)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Original Buy\/Sell Signals<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">HASBULLISHPROFILEPATTERN \u2014 Original profile pattern buy signal\nHASBEARISHPROFILEPATTERN \u2014 Original profile pattern sell signal<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Data Analytics variables<\/h3>\n\n\n<p><em>Available only on the Data Analytics version of pjsProfileBars. These require machine learning models and Ollama to be set up.<\/em><\/p>\n\n\n<h4 class=\"wp-block-heading\">Expected Outcome<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">DAEOC0 \u2014 Current expected outcome score\nDAEOC1 \u2014 Smoothed expected outcome score\nDAEOCF \u2014 Far-future expected outcome score<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">ML Scores<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">DARRLONG \u2014 ML long classification score\nDARRSHORT \u2014 ML short classification score<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Trade Bias<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">DATRADEBIAS \u2014 Trade bias: 0 = neutral, positive\/negative for directional lean\nDATRADEBIASCONFIDENCE \u2014 Confidence level of the trade bias prediction as a percentage (0 to 100)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Market Analysis<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">DAMARKETBIAS \u2014 Market bias from ML analysis\nDACLASSIFIERCUSTOMMATCH0 \u2014 Custom classifier match score<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Signal Variables (DA only)<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">HASBULLISHHIGHPROBABILITYDA \u2014 High probability DA setup (bullish)\nHASBEARISHHIGHPROBABILITYDA \u2014 High probability DA setup (bearish)\nHASBULLISHENSDA \u2014 ENS DA signal (bullish)\nHASBEARISHENSDA \u2014 ENS DA signal (bearish)\nHASBULLISHPORTFOLIO \u2014 Bullish portfolio signal\nHASBEARISHPORTFOLIO \u2014 Bearish portfolio signal<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Voice alert<\/strong><br \/>The voice announcement you want when the criteria is met, at the close of bar.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Audio alert<\/strong><br \/>The custom audio alert you want (.wav file) played when the criteria is met, at the close of bar.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Chart marker<\/strong><br \/>If checked, the signal name will be printed on the chart. This option uses a native text object (so third-party indicators can also read it), so it may affect performance if you are generating thousands of them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Chart marker brush<\/strong><br \/>Custom colouring for the chart markers<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Above bar?<br \/>You have the choice of placing any chart market above or below the bar<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Paint bar<\/strong><br \/>Will paint the body of the bar where the signal is generated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Paint background<\/strong><br \/>Will colour the background of the chart on the bar where the signal is generated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Signal name<\/strong><br \/>This is the custom signal name you give to this set of criteria.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Take trade<\/strong> (buy &amp; sell)<br \/>These options will trigger trades, but only if you have the algo helper enabled and armed. The <a href=\"https:\/\/pjsmith.me.uk\/index.php\/docs\/pjsprofilebars\/general-feature-notes\/algo-helper\/\" data-type=\"link\" data-id=\"https:\/\/pjsmith.me.uk\/index.php\/docs\/pjsprofilebars\/general-feature-notes\/algo-helper\/\">algo helper<\/a> enables you to semi-automate your entries or exits based on the trigger of your criteria in the algobars conditions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This list has been updated since it was originally written with newly supported terms from new releases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nice examples and advice are often shared in the Discord.<\/p>\n","protected":false},"featured_media":0,"parent":5388,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-5454","docs","type-docs","status-publish"],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"comment_count":0,"_links":{"self":[{"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/docs\/5454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=5454"}],"version-history":[{"count":10,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/docs\/5454\/revisions"}],"predecessor-version":[{"id":8359,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/docs\/5454\/revisions\/8359"}],"up":[{"embeddable":true,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/docs\/5388"}],"next":[{"title":"Algo helper","link":"https:\/\/pjsmith.me.uk\/index.php\/docs\/pjsprofilebars\/general-feature-notes\/algo-helper\/","href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/docs\/7253"}],"prev":[{"title":"Alerts","link":"https:\/\/pjsmith.me.uk\/index.php\/docs\/pjsprofilebars\/general-feature-notes\/alerts\/","href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/docs\/7228"}],"wp:attachment":[{"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=5454"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/pjsmith.me.uk\/index.php\/wp-json\/wp\/v2\/doc_tag?post=5454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}