Know somebody, how I can handle spreads? If I run the system (see below), TS calculate the mom series, but I want to see the different between mom series and independent1. It's important, because I need the different for calculating P/L in tradeplan.
For ideas I'm very open.
Thank's all folks.
Sub Spread(Days)
Dim Move As BarArray Dim Spread As BarArray Dim Nxtopen Dim Data1 As BarArray Dim Data2 As BarArray
Data1=Close Data2=Close Of independent1 Spread=Data1-Data2 Move=XAverage(Spread,Days,0) Nxtopen=NextOpen(0)
If BarNumber=LastBar Then Nxtopen=0 End If
If CrossesUnder(Spread,Move) Then Sell("SellSpread",1,0,Nxtopen,Market) Else If CrossesOver(Spread,Move) Then Buy("BuySpread",1,0,Nxtopen,Market) End If End If
End Sub |