I'm unable to find a snippet to assist. I'm trying to place a limit exit at the median price of [0] if i get a close below an sma. This is where I am so far: I have the condition, but can't get the limit order going:
if (CrossBelow(Close, SMA(Close, Convert.ToInt32(26)), 1))
{
ExitLongLimit(Convert.ToInt32(DefaultQuantity), (Median[0] ) , "");
}
I also tried
if (CrossBelow(Close, SMA(Close, Convert.ToInt32(26)), 1))
{
SetProfitTarget(Convert.ToInt32(DefaultQuantity), (Median[0] ) , "");
}
Any direction would be appreciated, thx
David

Comment