I am beginner for coding.I could not find a solution to the problem.
I have SDK line.This is Between 0 and 100. I multiplication this sdk with coefficient.
I want ;
if RSI > 50 and sdk>ref(sdk,-1) then to multiply larger coefficient
if RSI < 50 and sdk<ref(sdk,-1) then to multiply larger coefficient
if RSI > 50 and sdk<ref(sdk,-1) then to multiply smaller coefficient
if RSI < 50 and sdk>ref(sdk,-1) then to multiply smaller coefficien
the rules is above
I try this code but it is not true
sdk1=((sk*a)+(sd*b)+(PFF*y))/(a+y+b);
xx=Param("Periodx",28,50,100,1);
xx=Optimize("Periodx",10,50,100,1);
x=Param("Periodx",10,10,50,1);
x=Optimize("Periodx",10,10,50,1);
sdk=IIf((sdk1>Ref(sdk1,-1)AND RSI(10)>50),TSF(sdk1,xx),TSF(sdk1,x));
I have SDK line.This is Between 0 and 100. I multiplication this sdk with coefficient.
I want ;
if RSI > 50 and sdk>ref(sdk,-1) then to multiply larger coefficient
if RSI < 50 and sdk<ref(sdk,-1) then to multiply larger coefficient
if RSI > 50 and sdk<ref(sdk,-1) then to multiply smaller coefficient
if RSI < 50 and sdk>ref(sdk,-1) then to multiply smaller coefficien
the rules is above
I try this code but it is not true
sdk1=((sk*a)+(sd*b)+(PFF*y))/(a+y+b);
xx=Param("Periodx",28,50,100,1);
xx=Optimize("Periodx",10,50,100,1);
x=Param("Periodx",10,10,50,1);
x=Optimize("Periodx",10,10,50,1);
sdk=IIf((sdk1>Ref(sdk1,-1)AND RSI(10)>50),TSF(sdk1,xx),TSF(sdk1,x));
Last edited: