NO COMMISSIONS on Strategy Analyzer. I set my commissions in options it doesn't show up.
and something is Up with my Code. I tried to make it Open 2 Trades. One for a quick Scalp which gets Closed on the 3rd Bar closing in a row. and the other on the Original Condition.
It's Not working. my Code looks like this now:
//ENTRY LONG:
/* When our indicator gives us a bull signal we enter long. Notice that we are accessing the
public BoolSeries we made in the indicator. */
if (Position.MarketPosition == MarketPosition.Flat && DG_HighVolumeScalper(5).BuySignal[0])
{
//DrawDot("My dot" + CurrentBar, false, 0, Close[0] - 10 * TickSize, Color.Blue);
EnterLong(1000, "Trend");
EnterLong(2000, "Scalp");
buyTrigBar = CurrentBar -1;
}
//STEP 2: EXITS
//Trades DON't CLOSE until These conditions are met
//Condition 1: the 3 Bar Scalp, Closes 2 contracts after the 3rd bar after Trig Bar Closes
if( (Position.MarketPosition == MarketPosition.Long) && (CurrentBar - 1 > buyTrigBar) && (CurrentBar < buyTrigBar + 3) && ((Close[0] > Open[0])) )
{ ExitLong("Scalp"); }
//Condition 2: a bar closes in Opposite direction CLOSE any Open Positions
if( (Position.MarketPosition == MarketPosition.Long) && ((Close[0] < Open[0])) )
{
ExitLong();
}
//ENTRY SHORT:
// When our indicator gives us a bear signal we enter short
if (Position.MarketPosition == MarketPosition.Flat && DG_HighVolumeScalper(5).SellSignal[0] )
{
//DrawDot("My dot" + CurrentBar, false, 0, Close[0] + 10 * TickSize, Color.Red);
EnterShort(1000, "Trend");
EnterShort(2000, "Scalp");
sellTrigBar = CurrentBar - 1;
}
//STEP 2: EXITS
//Trades DON't CLOSE until This condition is met
//Condition 1: SCALP 3 bar Close in same direction
if( (Position.MarketPosition == MarketPosition.Short) && (CurrentBar - 1 > sellTrigBar) && (CurrentBar < sellTrigBar + 3) && ((Close[0] < Open[0])) )
{ ExitShort("Scalp"); }
//1 bar close in Opposite direction (2 UpBars close after entering trade.
if( (Position.MarketPosition == MarketPosition.Short) && (Close[0] > Open[0]) )
{
ExitShort();
}

Comment