Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
That would be a great idea, along with a possible MetaStock loop routine.
Quote:
... insanely complex to follow.
You want insanity? Try this simple nested If() code:
---8<------------
x:=C;
If(x>1,x,
If(x>2,x,
If(x>3,x,
If(x>4,x,
If(x>5,x,
If(x>6,x,
If(x>7,x,
If(x>8,x,
If(x>9,x,
If(x>10,x,
If(x>11,x,
If(x>12,x,
If(x>13,x,
If(x>14,x,
If(x>15,x,
If(x>16,x,
If(x>17,x,
If(x>18,x,
If(x>19,x,
If(x>20,x,
If(x>21,x,
If(x>22,x,
If(x>23,x,
If(x>24,x,
If(x>25,x,
If(x>26,x,
If(x>27,x,
If(x>28,x,
If(x>29,x,
If(x>30,x,
1))))))))))))))))))))))))))))))
---8<------------
... and time it to see how long MetaStock needs to process and plot it.
Each new nested If() condition adds an exponential amount of processing time - the final result makes the PREV function look lightning fast. :)
jose
http://www.metastocktools.com
|