| Cover(Place) |
This procedure has one parameter:
| Place | The day where the cover signal must be set. |
Example:
|
' This is a system based on Parabolic SAR ' It only shorts stocks Sub Main() For CurrentBar = BeginBar to EndBar SAR1 = GetValue("SAR", CurrentBar) SAR2 = GetValue("SAR", CurrentBar - 1) P1 = Close(CurrentBar) P2 = Close(CurrentBar - 1) If (P1 < SAR1) and (P2 > SAR2) then Short(CurrentBar) End If If (P1 > SAR1) and (P2 < SAR2 ) then Cover(CurrentBar) end If Next End Sub |