i took these lines of code from http://www.amibroker.com/docs/MTFIndicators.html
Count = 0;
result = 0;
for( i = 5; i <= 360; i = i+5 )
{
TimeFrameSet( i * in1Minute );
m = RSI();
TimeFrameRestore();
m = TimeFrameExpand( m, i * in1Minute );
result = result + IIf( m > 70, 1, IIf( m < 30, -1, 0 ) );
Count++;
}
now i have two conditions A and B.
A=(A1 OR A2) //A is some buy condition with multi indicators
B=(B1 OR B2).// B is some sell condition with multi indicators
what i want is -
result = result + iff( m = A, 1, iff( m = B, -1, 0));
as i am new to amibroker, so please any one help me editing this code according my requirement.
thanks in advance.
Count = 0;
result = 0;
for( i = 5; i <= 360; i = i+5 )
{
TimeFrameSet( i * in1Minute );
m = RSI();
TimeFrameRestore();
m = TimeFrameExpand( m, i * in1Minute );
result = result + IIf( m > 70, 1, IIf( m < 30, -1, 0 ) );
Count++;
}
now i have two conditions A and B.
A=(A1 OR A2) //A is some buy condition with multi indicators
B=(B1 OR B2).// B is some sell condition with multi indicators
what i want is -
result = result + iff( m = A, 1, iff( m = B, -1, 0));
as i am new to amibroker, so please any one help me editing this code according my requirement.
thanks in advance.