- 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 );
}
}
}
}
}