How to invoke pandas.rolling.apply with parameters from multiple column?
<p>I've got a dataset:</p>

<pre><code>    Open     High      Low    Close        
0  132.960  133.340  132.940  133.105
1  133.110  133.255  132.710  132.755
2  132.755  132.985  132.640  132.735 
3  132.730  132.790  132.575  132.685
4  132.685  132.785  132.625  132.755
</code></pre>

<p>I try to use rolling.apply function for all rows, like this:</p>

<pre><code>df['new_col']= df[['Open']].rolling(2).apply(AccumulativeSwingIndex(df['High'],df['Low'],df['Close']))
</code></pre>

<ul>
<li>shows error</li>
</ul>

<p>or </p>

<pre><code>df['new_col']=  df[['Open', 'High', 'Low', 'Close']].rolling(2).apply(AccumulativeSwingIndex)
</code></pre>

<ul>
<li>pass only parameter from column 'Open'</li>
</ul>

<p>Can anybody help me?</p>