OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


This message cannot be deleted. It is the first message of the thread.
Administrators or moderators may choose to delete the entire thread


 
julesrulesny

Legend
100100100100252525
Posts: 498

Joined: 8/28/2009
Location: NYC

User Profile
 
Subject : SysTriggerLine - Reversing Signals(how to?) #STOP
Posted : 12/29/2014 11:01 PM
Post #23254

Hello,

I forgot who wrote "SysTriggerLine". Who ever did it is one of the greatest, simplest trend following systems I have used.. A simple adjustment of the parameters at various times of the 24hour trading day, occasionally timed with some volatility indicator, or just patterns and price.. It becomes a masterful system to use on Forex.. And that is all one may need due to its simplicity.

Works best during busiest rading hours around 3am to 10am and 5pm to 11pm when markets trend the most.

anyways, my goal is to write this also as a STOP, so I can get reversing sigals and Enter re-enter when the signals change... I have tried writing this as a stop.. I have tried creating TWO strategies, one where SysTriggerLine fires as a LONG.. and another strategy where SysTriggerLine fires as a SHORT. Nothing seems to work..

I really want it to STOP out when it changes from Long to short and vice versa.. Then re-enter. As you can see in attachment "Points 1 2 3 4 Systrigger" .. (Point 1 is an enter for a Short, point A i'd like to exit, then re-enter as a LONG.. Point 2, exit the LONG, and re-enter as a SHORT.. And so on...).

***However, I tried something else as well - this didn't work either -- an early warning I noticed - **As you can see in attachment "Close Above Systrigger A"... Sometimes price will CLOSE above or below the SysTriggerLine BEFORE it actually changes from Long to Short, or Short to Long. **See below: "SysTriggerABstop"

#Stop

Dim sumof as Single
Dim i as Integer
Dim tmp as Single
Dim wt as Single
Dim lsma_ma as Single

#Param "RPeriod" ,30,1,60
#Param "LSMA_Period" ,20,2,60

Dim myTRG As Single
myTRG = systriggerline2

sumof = 0
For i = 0 To (RPeriod-1)
tmp = ((RPeriod-i) - ((RPeriod+1)/3))*Close
sumof = sumof + tmp
Next
wt = sumof*6/(Rperiod*(Rperiod+1))
lsma_ma = wt[1] + (wt-wt[1])*2/(LSMA_Period+1)


If wt[1] < lsma_ma[1] and wt > lsma_ma Then
Signal = LongSignal
ElseIf wt[1] > lsma_ma[1] and wt < lsma_ma Then
Signal = ShortSignal
End If

If wt > lsma_ma Then
PlotPrice("wt", wt, Blue, 2)
PlotPrice("lsma_ma", lsma_ma, Blue, 2)
ElseIf wt < lsma_ma Then
PlotPrice("wt", wt, Red, 2)
PlotPrice("lsma_ma", lsma_ma, Red, 2)
End If

If Signal = LongSignal and
C[1] < myTRG[1] and C > myTRG then
Signal = exitSignal

ElseIf
If Signal = ShortSignal and
C[1] > myTRG[1] and C < myTRG then
Signal = exitSignal
End If







For what its worth, I'd rather just enter/exit as reversing signals.. So I attempted this: SysTriggerEEstop

#Stop

Dim sumof as Single
Dim i as Integer
Dim tmp as Single
Dim wt as Single
Dim lsma_ma as Single

#Param "RPeriod" ,30,1,60
#Param "LSMA_Period" ,20,2,60

sumof = 0
For i = 0 To (RPeriod-1)
tmp = ((RPeriod-i) - ((RPeriod+1)/3))*Close
sumof = sumof + tmp
Next
wt = sumof*6/(Rperiod*(Rperiod+1))
lsma_ma = wt[1] + (wt-wt[1])*2/(LSMA_Period+1)


If wt[1] < lsma_ma[1] and wt > lsma_ma Then
Signal = LongSignal
ElseIf wt[1] > lsma_ma[1] and wt < lsma_ma Then
Signal = ExitSignal

If wt[1] > lsma_ma[1] and wt > lsma_ma Then
Signal = ShortSignal
ElseIf wt[1] < lsma_ma[1] and wt < lsma_ma Then
Signal = ExitSignal

End If




Clearly, neither work -- and I am at a loss.. I tried copying and pasting using other stops.. and filling in the gaps.. ****I even tried using my zScoreMA as a Stop..(As often when the indicator ZERO line is crossed, signifies a trend change in direction at same time with SysTriggerLine .. couldn't do that either)..

Thanks if anyone can point me in the right direction.

Marc



[Edited by julesrulesny on 12/29/2014 11:20 PM]

Attached file : sysTriggerLine.txt (0KB - 400 downloads)
Attached file : sysTriggerLine2.txt (0KB - 384 downloads)
Attached file : points 1 2 3 4 systrigger.PNG (40KB - 521 downloads)
Attached file : close above SysTrig at A.PNG (13KB - 413 downloads)

Deleting message 23254 : SysTriggerLine - Reversing Signals(how to?) #STOP


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.