Hello. I am trying to plot Hourly Moving Avg on 5 minute spread chart. Is it not possible to use ParamField function and then use TimeFrameSet?

Please guide on what's the correct way to code a common multi-tf EMA which can be applied on price chart or a spread chart. Please note: using PriceField with TimeFrameSet is not looking possible even on a normal price chart (not just spread chart)

Trying to explain the issue below:

Presented below are the charts and EMA codes used.

The one right below is showing the EMA incorrectly when using PriceField function. (code presented after the screenshot)

```
P = ParamField( "Price field", -1 );
per = Param( "EMA Period", 20, 5, 500, 1 );
TimeFrameSet( inHourly );
m = Ref( EMA( P, per ), -1 );
TimeFrameRestore();
m = TimeFrameExpand( m, inHourly );
Plot( m, "EMA " + per, colorWhite, styleThick + styleNoRescale );
```

.

.

Now, the screenshot below is the accurate one, which is the result of directly using "Close".

The code for which is

```
per = Param("EMA Period",20,5,500,1);
TimeFrameSet(inHourly);
m = Ref(EMA(C,per),-1);
TimeFrameRestore();
m = TimeFrameExpand(m, inHourly);
Plot(m,"EMA "+per,colorWhite,styleThick+styleNoRescale);
```

As you can see, the spread chart is using "Close" of the stock (I know why - as the spread is not a symbol). And, price chart is, of course, showing the EMA correctly.

But then how do I :

a.) Use ParamField with TimeFrameSet

b.) So that I can use it on spread charts and normal price charts

Thanks for your time. Your help is appreciated