Hi,
I would like to ask for help to convert the following code (I guess is Metastocks) to easy language. Thanks.
VAR2:=REF( LOW, 1 ) ;
VAR3:=SMA(ABS(LOW-VAR2 ) , 3 , 1 ) / SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF( CLOSE * 1.2 , VAR3*5 , VAR3 / 5 ) , 9 ) ;
VAR5:=LLV(LOW,67 ) ;
VAR6:=HHV(VAR4,67 ) ;
VAR7:=IF(LLV(LOW,76),1,0 ) ;
VAR8:=EMA(IF(LOW<=VAR6,(VAR6+VAR7*2)/2,0),5)/548*VAR7;
ST01:STICKLINE (1, VAR8 ,0 ,4 ,1 ),COLORF000FF, NOTITLE;
code conversion to easy language
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: code conversion to easy language
Here's a first untested attempt:I would like to ask for help to convert the following code (I guess is Metastocks) to easy language. Thanks.
Code: Select all
value2 = Low[1];
value3 = AverageFC(AbsValue(Low - value2), 3) / AverageFC(MaxList(Low - value2, 0), 3) * 100;
value4 = XAverage(iff(Close * 1.2 ? ___, value3 * 5, value3 / 5), 9);
value5 = Lowest(Low, 67);
value6 = Highest(value4, 67);
value7 = iff(Lowest(low, 76) ? ___, 1, 0);
value8 = XAverage(iff(Low <= value6, (value6 + value7 * 2) / 2, 0), 5) / 548 * value7;
// ST01:STICKLINE (1, VAR8 ,0 ,4 ,1 ),COLORF000FF, NOTITLE; ???
Re: code conversion to easy language
Thanks JoshM, actually I have no idea about the syntax of original code. What will be the output of these 2 line code (for value4 and value7) if the test is not valid?
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: code conversion to easy language
Well the point is that, the way I understand it, the original code doesn't perform a test:What will be the output of these 2 line code (for value4 and value7) if the test is not valid?
Code: Select all
IF( CLOSE * 1.2 , VAR3*5 , VAR3 / 5 )
Code: Select all
IF( CLOSE * 1.2 > CLOSE , VAR3*5 , VAR3 / 5 )
Code: Select all
IF( CLOSE * 1.2 <= 100 , VAR3*5 , VAR3 / 5 )