Thanks.
protected override void Initialize()
{
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
{
// Use this code to setup the upper and lower bands
// Offset
double offset = ATR(14)[0] * bandFactor;
// Lower Band
double Variable6 = SMA(14)[0] - offset;
// Upper Band
double Variable7 = SMA(14)[0] + offset;
Print("offset = " + offset.ToString());
}
{
{
if (BarsInProgress == 0)
{
// Condition set 1 (Long Entries)
if (Close[0] >= Open[0]
&& Close[0] >= Variable6
&& Low[1] <= Variable6)
{
EnterLong(DefaultQuantity, "");
}
Comment