Can anyone verify of it's possible to call the SuperTrend indicator in an entry condition in order to verify if an instrument is in an uptrend?
For example,
// Long entry signal
if (
Position.MarketPosition == MarketPosition.Flat
&& Close [1] > Open [1]
&& Close [0] > SuperTrend(10, 2.5, true).UpTrend[0]
)
{
EnterLong
}
Does , "Close [0] > SuperTrend(10, 2.5, true).UpTrend[0]", actually verify that you are in an uptend? From testing it on live data it doesn't look like it does.
Do I need to use the TSSuperTrend indicator instead. I've looked through a lot of posts on the web and can only find the cross over code for SuperTrend.
e.g.,
CrossAbove(Close, SuperTrend(10, 2.5, true).UpTrend, 0)
If someone could post the code that verifies if SuperTrend is in an uptrend I'd really appreciate it!