ApplyDefaultValue

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Bars Type >

ApplyDefaultValue

Previous page Return to chapter overview Next page

Definition

Sets the default BarsPeriod values used for a custom Bar Type.

 

Method Return Value

This method does not return a value.

 

Parameters

period

The BarsPeriod chosen by the user when utilizing this Bars type

 

 

Syntax

You must override the method in your Bars Type with the following syntax:

 

public override void ApplyDefaultValue(BarsPeriod period)
{
 
}

 

Examples

ns


public override void ApplyDefaultValue(BarsPeriod period)

{

 period.BarsPeriodTypeName = "MyBarType";

 period.Value = 1;

}