Optimization - reading the manual is a MUST, was: PMAX indicator

ref : PMAX Indicator in Amibroker

// PMax @version=4

@fxshrat @didrip @bysoaa
Nice translation work indeed.
Newbie and candid, i simply copied the post 11 Pmax fxshrat summary version I sent it to my Analysis window.
To start, I tried "Walk-forward" (I am fan of walk-forward and optimization procedure)
I get Notice "You haven't specified any variables for optimization"
There is no "optimize" argument in the formula but walk-forward might be possible.
Then I tried "Backtest" ; I get Error 701. "Missing Buy/sell variable assigment".
However, if the following looks like Buy/Sell vaiable assignment

buySignalk = Cross(MAvg, PMax);
	sellSignallk = Cross(PMax, MAvg);
```buySignalc = Cross(src, PMax);
	sellSignallc = Cross(PMax, src); 
it is not exactly  :
"The formula that you are trying to backtest does not contain proper Buy and Sell rules. Buy and Sell rules should be written as assignments as shown below:
`Buy = Cross( Close, MA( Close, 50 )      ); Sell = Cross( MA( Close, 50 ), Close ) );`
Nevertheless, fxshrat, didrip and bysoaa,  distinguished AFL experts, have translated and test successfully this formula...
My Amibroker version is PRO 6.40.4 feb 22 version
I am probably missing something.

You MUST read the manual:



Someone (me) wrote the manual for you to be read.