By using the information contained in the pages below, you understand and agree with the following terms:
- I AGREE that SharkIndicators does not warrant the functionality contained in the provided software code will meet your requirements or the operation of the software in conjunction with BloodHound will be uninterrupted or error-free.
- I AGREE that using any of the information, including software code samples, are at my own risk. I shall defend, indemnify and hold SharkIndicators, its employees and associates harmless from any and all claims, damages, or losses resulting from its use.
- I AGREE that SharkIndicators is not under any obligation to provide support for the operation of any code derived from these examples and that I assume all associated risks and costs.
- I AGREE that in no event will SharkIndicators or its distributors be liable to you or others for any damages, including any lost profit, savings, lost patience or other incidental, or consequential damage.
-- I AGREE --
BloodHound Simple Strategy Example 2
Please note, SharkIndicators does not provide any NinjaScript, programming, or coding support.
This information is provided as-is and for knowledgeable programmers.
Note:You must have ‘Developer Extensions’ checked when you ran the SharkIndicators Installer. That will also install the example code file.
In this example, we use a logic template for the entries, and another logic template for the exits. We allow the user to select which template to use for each case.
Firstl, be sure to derive your class from the ‘SiBloodHoundStrategy’ class as in line 22. In this example, notice that 2 public properties have been declared for the user to select logic templates: EntryLogicTemplate, and ExitLogicTemplate. They are declared as integers (int) and use the BloodHoundLogicDropDownSelectorTypeConverter2 as seen on lines 31 and 52.
Note:BloodHoundLogicDropDownSelectorTypeConverter2 counterpart BloodHoundLogicDropDownSelectorTypeConverter is designed for WinForms classic property grid, whereas BloodHoundLogicDropDownSelectorTypeConverter2 is designed for the WPFPropertyGrid
Finally the entry and exit logic values are retrieved from BloodHound using the GetLogicSignalValue() method, using the logic templates identified by EntryLogicTemplate and ExitLogicTemplate as seen on lines 131, 142, 160 and 172.
The SharkIndicaotor's Installer will install this file to the ...\NinjaTrader 8\bin\Custom\Strategies\ folder when the Developer Extensions are selected.
The last version to support Developer Extension is Ver 1.233.6603. It may be downloaded from the Changelog page. If you have a newer version installed, it must be uninstalled first and then restart the computer.
Download the import file below and import it into NinjaTrader 7 from the Control Center. Select the File menu » Utilities » Import NinjaScript.
Download import file for NT 7 (.zip)