Unfortunately the way the function works you are limited to pre-defined aggregation periods. You can only use Day, 2 Days, 3 Days, 4 Days, Week, and Month. For example, if you try 10 Days or 2 Weeks then you get nothing. For the PriceType you can use Last, Bid, Ask. Have to manually key in cuz I don't know how to create lists in TOS.
Implied Volatility has no "length" in its mathematical calculation as opposed to His Volatility. Implied Volatility is calculated as the volatility necessary in Black & Sholes (or any other model you are using) in order to get the actual traded price (usually the mean between the bid and the ask). This why oyu dont see in TOS a "length" parameter for IV but there is one for HV.
The IV presented to you is usually on a yearly basis. If you want to calculate the corres ponding IV for a T number of days the fornula is: