[COLOR=#0000ff][COLOR=#0000ff][COLOR=#0000ff][FONT=Courier New]if[/FONT][/COLOR][/COLOR][/COLOR][FONT=Courier New][COLOR=#000000] (BarsInProgress == [/COLOR][COLOR=#800080][COLOR=#800080][COLOR=#800080]0[/COLOR][/COLOR][/COLOR][/FONT][FONT=Courier New][COLOR=#000000])[/COLOR][/FONT]
[FONT=Courier New]{[/FONT]
[COLOR=#0000ff][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/COLOR][FONT=Courier New] (Position.MarketPosition == MarketPosition.Flat)[/FONT]
[FONT=Courier New]{[/FONT]
[FONT=Courier New]DoSomething[/FONT]
[FONT=Courier New]}[/FONT]
[FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]else[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000] (Position.MarketPosition == MarketPosition.Long)[/COLOR][/FONT]
[FONT=Courier New]{[/FONT]
[/FONT][FONT=Courier New]DoSomething[/FONT]
[FONT=Courier New]}[/FONT]
[FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]else[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000] (Position.MarketPosition == MarketPosition.Short)[/COLOR][/FONT]
[FONT=Courier New]{[/FONT]
[/FONT][FONT=Courier New]DoSomething[/FONT]
[FONT=Courier New]}[/FONT]
}
[FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]else[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000] (BarsInProgress == [/COLOR][/FONT][/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]1[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000])[/COLOR][/FONT]
[FONT=Courier New]{[/FONT]
[/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New] (Position.MarketPosition == MarketPosition.Long)[/FONT]
[FONT=Courier New]{[/FONT]
[/FONT][FONT=Courier New][FONT=Courier New]}[/FONT]
[/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New] (Position.MarketPosition == MarketPosition.Short)[/FONT]
[FONT=Courier New]{[/FONT]
[/FONT][FONT=Courier New][FONT=Courier New]}[/FONT]
[FONT=Courier New]}[/FONT]
[/FONT]
[FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]
[FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000] (Position.MarketPosition == MarketPosition.Flat)[/COLOR][/FONT]
[FONT=Courier New]{[/FONT]
[/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000] (BarsInProgress == [/COLOR][/FONT][/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]0[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#000000])[/COLOR][/FONT]
[FONT=Courier New]{[/FONT]
[FONT=Courier New]Do Something[/FONT]
[FONT=Courier New]}[/FONT]
[FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]else[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000] (BarsInProgress == [/COLOR][/FONT][/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]1[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000])[/COLOR][/FONT]
[/FONT][FONT=Courier New]{[/FONT]
[FONT=Courier New]Do Something[/FONT]
[FONT=Courier New]}[/FONT]
[FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][COLOR=#000000](Position.MarketPosition == MarketPosition.Long)[/COLOR][/FONT]
[FONT=Courier New]{[/FONT]
if[FONT=Courier New][FONT=Courier New][COLOR=#000000] (BarsInProgress == [/COLOR][/FONT][/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]0[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#000000])[/COLOR][/FONT]
[FONT=Courier New]{[/FONT]
[FONT=Courier New]Do Something[/FONT]
[FONT=Courier New]}[/FONT]
[FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]else[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000] (BarsInProgress == [/COLOR][/FONT][/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]1[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000])[/COLOR][/FONT]
[/FONT][FONT=Courier New]{[/FONT]
[FONT=Courier New][SIZE=2][SIZE=2][FONT=Courier New]}[/FONT][/SIZE]
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2][COLOR=#000000] (Position.MarketPosition == MarketPosition.Short)[/COLOR][/SIZE][/FONT]
[/SIZE][/FONT]{
if[FONT=Courier New][FONT=Courier New][COLOR=#000000] (BarsInProgress == [/COLOR][/FONT][/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]0[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][COLOR=#000000])[/COLOR][/FONT]
[FONT=Courier New]{[/FONT]
[FONT=Courier New]Do Something[/FONT]
[FONT=Courier New]}[/FONT]
else[FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff][FONT=Courier New][COLOR=#0000ff]if[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000] (BarsInProgress == [/COLOR][/FONT][/FONT][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080][FONT=Courier New][COLOR=#800080]1[/COLOR][/FONT][/COLOR][/FONT][/COLOR][/FONT][FONT=Courier New][FONT=Courier New][COLOR=#000000])[/COLOR][/FONT]
[/FONT][FONT=Courier New]{[/FONT]
[FONT=Courier New][SIZE=2][SIZE=2][FONT=Courier New]}[/FONT][/SIZE]
[/SIZE][/FONT]
Regards
Kay Wai

Comment