I am using the following to enter a short position when the currentbid has passed above the Sqh line of a polynominal regression channel. I am offsetting the channel, I know the channel is adjusted by current price so is not perfect for a strategy, but I am just experimenting.
I would like to enter a short position when the price passes above and then crosses below the Sqh line.
if (GetCurrentBid() >= PRC2(3, 105, 1.62, 2, 34, 34).Sqh[0] + 0 * TickSize)
{
EnterShort(DefaultQuantity, "");
}
Can anyone help me with the code for this?

Comment