Would anyone be kind enought to point out whats gong wrong with this code. I get a red box on the def statment and "Incompatible parameter: "RSI" at 17:5".
I have been screwing with it all day now.
#My Backtesting code Tony Baker 9-22-2023
#for MarketForecast and RSI
#
#marketForcaster definitions
input OverBought = 80;
input OverSold = 20;
input Show_Labels = yes;
input Show_Clusters = yes;
input price = close;
input length = 14;
def MF_Cluster = MarketForecast()."intermediate" < 20 and
MarketForecast()."Momentum" < 20 and
MarketForecast()."NearTerm" < 20 ;
#plot data = RSI()."RSI" crosses above 50 and MF_cluster is true within 10 bars;
AddOrder(OrderType.BUY_AUTO, MF_Cluster) ;
#AddOrder(OrderType.BUY_AUTO, RSI > 50 and RSI[1] < 50 and MF_Cluster == 1 within 10 bars) ;
AddOrder(OrderType.BUY_AUTO , "RSI"> 50 and "RSI[1]" < 50 and MF_cluster is true within 10 bars) ;
I have been screwing with it all day now.
#My Backtesting code Tony Baker 9-22-2023
#for MarketForecast and RSI
#
#marketForcaster definitions
input OverBought = 80;
input OverSold = 20;
input Show_Labels = yes;
input Show_Clusters = yes;
input price = close;
input length = 14;
def MF_Cluster = MarketForecast()."intermediate" < 20 and
MarketForecast()."Momentum" < 20 and
MarketForecast()."NearTerm" < 20 ;
#plot data = RSI()."RSI" crosses above 50 and MF_cluster is true within 10 bars;
AddOrder(OrderType.BUY_AUTO, MF_Cluster) ;
#AddOrder(OrderType.BUY_AUTO, RSI > 50 and RSI[1] < 50 and MF_Cluster == 1 within 10 bars) ;
AddOrder(OrderType.BUY_AUTO , "RSI"> 50 and "RSI[1]" < 50 and MF_cluster is true within 10 bars) ;