TPSLONG(Long1,Long2,Long3,Long4,LongExit) ignores inputs.

A forum for all EdgeRater users

Moderator: Chris White

Post Reply
joel847
Posts: 15
Joined: Fri May 18, 2012 1:01 pm

TPSLONG(Long1,Long2,Long3,Long4,LongExit) ignores inputs.

Post by joel847 »

Hi Chris,

I have been trying to use the function TPSLONG(Long1,Long2,Long3,Long4,LongExit).
When testing the code below it seems that my modifications to the RSI2 limit value and also the exit logic limt value are simply ignored. I thought this function would allow me to make my own versions of TPS. The function must be calculating it's own RSI values internally and ignoring the logic inputs.

RSI2:=RSI(C,2);

Below25a:= RSI2 < 25;
Below25b:= REF(RSI2,1) < 25;
RsiAbove70:= RSI2 > 70;

Long1: Below25a & Below25b;
Long2: C < VALUEWHEN(C, Long1);
Long3: C < VALUEWHEN(C, Long2);
Long4: C < VALUEWHEN(C, Long3);

LongExit: RsiAbove70 ;
LongEntry: TPSLONG(Long1,Long2,Long3,Long4,LongExit);

Above75a:= RSI2 > 75;
Above75b:= REF(RSI2,1) > 75;
RsiBelow30:= RSI2 < 30;

Short1: Above75a & Above75b;
Short2: C > VALUEWHEN(C, Short1);
Short3: C > VALUEWHEN(C, Short2);
Short4: C > VALUEWHEN(C, Short3);

ShortExit: RsiBelow30;
ShortEntry: TPSSHORT(Short1,Short2,Short3,Short4,ShortExit);
Post Reply