Log in to see Cloud of Tags

Wealth-Lab Wiki

Wealth-Lab Wiki Page Editing

RSS
  • For basic wiki page editing, see screwturn wiki Page Editing
  • New Pages - You can create new wiki pages for the Knowledge Base and Open Source libraries. If you create a new Page, please follow these naming instructions for Page Name and Page Title fields:
    • Page Name is used in the url of the wiki page. It should be short and concise (no spaces please!) and must be unique.
      • Indicators - Use the Indicator's Class Name or an abbreviation of it (e.g. TEMA)
      • Other Open Source pages - Use the class and/or method name. (e.g. AlertByEmail)
      • KnowledgeBase - begin with "kb". (e.g. kbSizingEffects)
    • Page Title
      • Indicators - Use the Indicator's Class Name, but if it's an abbreviation or acronym, follow it with a hypen and spell it out (e.g. TEMA - Triple Exponential Moving Average)
      • Community Components and other libraries - Use the method name and descriptive, concise text
      • KnowledgeBase - descriptive (no standard) (e.g. Effects of Position Sizing)
  • Indicator Documentation
  • In order to post WL5 code as below, put it within the <code WL5></code> tags.


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

namespace WealthLab.Strategies { public class Squeeze : WealthScript { protected override void Execute() { DataSeries Squeeze = ( BBandUpper.Series( Close, 20, 2 ) - BBandLower.Series( Close, 20, 2 ) ) - ( KeltnerUpper.Series( Bars, 20, 20 ) - KeltnerLower.Series( Bars, 20, 20 ) ); Squeeze.Description = "Squeeze"; ChartPane SqueezePane = CreatePane( 30, true, true ); PlotSeries( SqueezePane, Squeeze, Color.Blue, WealthLab.LineStyle.Histogram, 3 ); for(int bar = Squeeze.FirstValidValue; bar < Bars.Count; bar++) { if (IsLastPositionActive) { if( CumDown.Series( Momentum.Series( Close, 14 ), 1 )[bar] >= 1 ) SellAtMarket( bar+1, LastPosition, "MomExit" ); } else { if( Squeeze[bar] < 0.00 ) BuyAtMarket( bar+1 ); } } } } }

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.