Param, paramfield or paramlist for switching a parameter which is value?

I want to calculate profit with parameter of "highest point in 14 days" or "Close price at 14 days" since buy date, i tried to change the field by paramfield or paramlist but also not work, should use another function??

takeprofitpt = paramlist("Take Profit Point" ,  highest14|closeat14);


Please do not post pictures only but full code also!
You have to set quotes.

case "Highest14":


Also in picture you use wrong Param function
It would be rather Paramalist function.
And second argument's content has to be within quotes too.


I am not writing full code because you do not do it too.

1 Like

Thanks a lot!!
Sor...becuase I am using stupid coding lots of duplicate sents like below, so rare post the whole code

case Highest14:
		//Take Profit Position - Highest Since Buyprice within 2 wk
		newbuy1highestpt = ValueWhen( newbuy3rdbar, HighestSince( newbuy1stbar, High ) );
		newbuy1highestpt = ValueWhen( newbuy4thbar, HighestSince( newbuy2ndbar, High ) );
		newbuy1highestpt = ValueWhen( newbuy5thbar, HighestSince( newbuy3rdbar, High ) );
		newbuy1highestpt = ValueWhen( newbuy6thbar, HighestSince( newbuy4thbar, High ) );
		newbuy1highestpt = ValueWhen( newbuy7thbar, HighestSince( newbuy5thbar, High ) );
		newbuy1highestpt = ValueWhen( newbuy8thbar, HighestSince( newbuy6thbar, High ) );
		newbuy1highestpt = ValueWhen( end9thbar, HighestSince( newbuy7thbar, High ) );
		newbuy1highestpt = ValueWhen( end10thbar, HighestSince( newbuy8thbar, High ) );

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.