Login Page - Create Account

Support Board


Date/Time: Fri, 27 Jan 2023 07:13:43 +0000



Post From: Assistance with converting study alert code to acsil

[2022-09-05 07:10:59]
User431178 - Posts: 193
Assuming you are using autoloop

For bullish:
if (sc.BaseDataIn[SC_RENKO_CLOSE][sc.Index] > sc.BaseDataIn[SC_RENKO_OPEN][sc.Index]
&& sc.BaseDataIn[SC_RENKO_CLOSE][sc.Index - 1] < sc.BaseDataIn[SC_RENKO_OPEN][sc.Index -1])
{


}

For bearish:
if (sc.BaseDataIn[SC_RENKO_CLOSE][sc.Index] < sc.BaseDataIn[SC_RENKO_OPEN][sc.Index]
&& sc.BaseDataIn[SC_RENKO_CLOSE][sc.Index - 1] > sc.BaseDataIn[SC_RENKO_OPEN][sc.Index -1])
{


}


or you maybe you could use sc.FormattedEvaluate()


For bullish:
if (sc.FormattedEvaluate(sc.BaseDataIn[SC_RENKO_CLOSE][sc.Index], sc.BaseGraphValueFormat, GREATER_OPERATOR, sc.BaseDataIn[SC_RENKO_OPEN][sc.Index], sc.BaseGraphValueFormat)
&& sc.FormattedEvaluate(sc.BaseDataIn[SC_RENKO_CLOSE][sc.Index - 1], sc.BaseGraphValueFormat, LESS_OPERATOR, sc.BaseDataIn[SC_RENKO_OPEN][sc.Index - 1], sc.BaseGraphValueFormat))
{


}


For bearish:
if (sc.FormattedEvaluate(sc.BaseDataIn[SC_RENKO_CLOSE][sc.Index], sc.BaseGraphValueFormat, LESS_OPERATOR, sc.BaseDataIn[SC_RENKO_OPEN][sc.Index], sc.BaseGraphValueFormat)
&& sc.FormattedEvaluate(sc.BaseDataIn[SC_RENKO_CLOSE][sc.Index - 1], sc.BaseGraphValueFormat, GREATER_OPERATOR, sc.BaseDataIn[SC_RENKO_OPEN][sc.Index - 1], sc.BaseGraphValueFormat))
{


}