Wealth-Lab Wiki

API ChartStyles Community Components Community Indicators IndexDefinitions Knowledge Base Misc Optimizers PosSizers Providers Standard Indicators TASC Traders Tips TASCIndicators Visualizers


Quick Search
Advanced Search »


public QStick(Bars bars, int period, string description)
public static QStick Series(Bars bars, int period)

Parameter Description

bars The Bars object
period Indicator calculation period


QStick provides a way to quantify candlestick values. The QStick indicator is calculated by taking a moving average of the difference between open and closing prices.


When QStick crosses above zero, this is considered bullish, and below zero bearish. You can also look for extreme QStick levels to determine overbought and oversold levels, or look for divergences between QStick and price to signal trend reversals.


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // See how good the QStick zero line entry rule really is

double stop = 0; double profit = 0; double ep = 0; DataSeries qs = QStick.Series( Bars, 24 ); ChartPane QStickPane = CreatePane( 50, true, true ); PlotSeries( QStickPane, qs, Color.DarkBlue, WealthLab.LineStyle.Solid, 2 ); for(int bar = 24; bar < Bars.Count; bar++) { if( CrossOver( bar, qs, 0 ) ) BuyAtMarket( bar+1 ); if( CrossUnder( bar, qs, 0 ) ) ShortAtMarket( bar+1 );

for (int p = ActivePositions.Count - 1; p > -1; p-- ) { Position pos = ActivePositions[p]; ep = pos.EntryPrice; stop = ( pos.PositionType == PositionType.Long ) ? ep*0.8 : ep*1.2; profit = ( pos.PositionType == PositionType.Long ) ? ep*1.1 : ep*0.9; if( !ExitAtStop( bar+1, pos, stop, "Stop Loss" ) ) ExitAtLimit( bar+1, pos, profit, "Profit Target" ); } } } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

ScrewTurn Wiki. Some of the icons created by FamFamFam.