
// Try to go LONG
{ if ( WatchToGoLong == 1 )
{
// Enter Long
if ((iOrderL1 == null && iQuantity1 != 0)
iOrderL1 = EnterLong(0, iQuantity1, sENTRY1L);
if ((iOrderL2 == null && iQuantity2 != 0)
iOrderL2 = EnterLongLimit(0, false, iQuantity2, Close[1], sENTRY2L);
if ((iOrderL5 == null && iQuantity5 != 0)
{ iOrderL5 = EnterLongLimit(0, true, iQuantity5, Close[1], sENTRY5L);
Position.AvgPrice = MyEnterP125;
Print("entry price= "+MyEnterP125);
}
return;
}
}
So:: what happens to each of the order samples? IF they are processed on each tick, is the Close[1] correct for target price or should it be Close[0], or GetCurrentAsk(0) .. even though there is a EnterLong() I am trying to stay away from market orders atm, but still need to test.

Should I use 'true' or 'false' as I am ordering on ticks not bar close?!
Can you tell this is my first FTOB piece of code?

TIA!
Jon

Comment