Help
I have this Excel formula that I need to convert to Metastock:
Signal is in column H =if(previousvalue<close,1,0)
Value is in column I =if(signal=1,if(close*percent1<previousvalue,previousvalue,close*percent1),if(close*percent2>previousvalue,previousvalue,close*percent2)
I located the following formula but it only gives me binary values - I need the values computed on price.
If(PREV = 1,
If(CLOSE < HighestSince(1,PREV <> 1,CLOSE)*.985,
-1,PREV),
If(PREV = -1, If(CLOSE>LowestSince(1,PREV <> -1,CLOSE)*1.015,
+1,PREV),
If(PREV = 0, If(CLOSE>Lowest(CLOSE)*1.015,
+1,
If(CLOSE<Highest(CLOSE)*.985,
-1,
PREV)),PREV)))
I have tried HighestSince, ValueWhen, etc. but it does not give me the same value as the Excel formula generates. I am currently linking Excel data to Metastock but really would lke to compute this in Metastock. Any assistance is greatly appreciated. Charley