Search | User Listing Vidsite | Calendars | Quotes
Home Page ->  OLang, OScript & OPilot -> Writing OLang Stops -> View ThreadLogon (or Register, or Join TradeTight)

You are logged in as a limited-access Guest.To join TradeTight, first read the info in the Organization & Content room, then click the link above. 

Proverbs 16:9 (ESV) ... The heart of a man plans his way, but the Lord establishes his steps.


Fixed-Loss Stop, Revealed! (plus Guts)
Jump to page : 1
Now viewing page 1 [50 msgs/pg]
Jump to room :
JimDean
Posted 5/23/2011 5:52 PM (#2227)
Subject: Fixed-Loss Stop, Revealed! (plus Guts)



Owner/Admin

Posts: 3925
2000100050010010010010025
Location:
USA: GA, Lawrenceville
Nirvana's "canned" Fixed-Loss stop is used in a huge number of strategies, as a "backup" in the event that other, fancier or tighter "virtual" stops fail to meet the needs. Sometimes those other stops don't kick-in until a profit-threshold is reached (gray dashed lines). It's important to ALWAYS have a Fixed-Loss stop active ... usually as a Stop-Market Broker order ... to play it safe.

The code shown below duplicates the functionality of the standard FL stop, and adds one extra option ... you can base the "reference price" for the initial stop on the "Guts" pricepoint of the Signal bar (not just the Close or the extreme). Guts is a representative price for the entire bar ... I use it very widely ... better IMHO than the "typical" price. Guts = (H+L+O+O+C+C)/6.

The main purpose of providing this code is to help you learn how to write other Stops, with various options controlled by input parameters. This stop not only plots the exit threshold line, but also plots a small magenta dash between the Signal bar and the Entry bar, showing where the selected Reference price lies.

The stop can be used with a virtual Stop-Market order, since ExitLevel is set ... or it can be used with a Market or MOO or MOC or BOO order, since it fires ExitSignal when the threshold is violated. It works equally well for EOD or RT feeds.

The final attached TXT file has the code - copy to C:\Program Files\Nirvana\OT2011\VBA\Stops

If you are a (paying) TradeTight Member, click here to check out an enhanced version of this stop, which allows you to dynamically utilize different Gap-calculation methods on different trades.

(aJDstFxdLoss - chart & settings.png)



(aJDstFxdLoss - codesnap.png)



Attachments
Attachments aJDstFxdLoss - chart & settings.png (76KB - 7 downloads)
Attachments aJDstFxdLoss - codesnap.png (36KB - 7 downloads)
Attachments aJDstFxdLoss.txt (2KB - 56 downloads)
Top of the page Bottom of the page
JimDean
Posted 5/10/2012 2:36 PM (#3632 - in reply to #2227)
Subject: Fixed-Loss Stop, Revealed! (plus Guts)



Owner/Admin

Posts: 3925
2000100050010010010010025
Location:
USA: GA, Lawrenceville
Here is a companion version of the stop, aJDstNirvFxdLoss, that does not have any extra bells and whistles, but just duplicates Nirvana's canned stop. Not quite as fancy as the version posted initially in this thread, but for "purists", here ya go ...


(aJDstNirvFxdLoss - codesnap.png)



Attachments
Attachments aJDstNirvFxdLoss - codesnap.png (39KB - 8 downloads)
Attachments aJDstNirvFxdLoss.txt (2KB - 42 downloads)
Top of the page Bottom of the page
Jump to page : 1
Now viewing page 1 [50 msgs/pg]
( E-mail a Link | Printer Version | Search Room )

Owner of site: Jim Dean -- Forum content is confidential, and may not be distributed without written permission.