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.


  Current location        Thread information  
OmniTrader Pro Resource Forum
OmniPilot Frequently Asked Questions
Filtering the focus list does not work with Pilot.
Last Activity 5/10/2016 5:29 PM
0 replies, 5701 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
Matthew Greenslet

Idol
2000252525
Posts: 2077

Joined: 2/27/2006

User Profile
 
Subject : Filtering the focus list does not work with Pilot.
Posted : 10/25/2007 10:35 AM
Post #7068

Q: I have filter my focus list but Omni Pilot trades on all the signals and not just the filtered ones. How can I use these filters?

A:


We will need to add some code to our Common.txt file. Highlight common.txt to view the code. The first subroutine you see is Trade_Focus list, the second is Do_Trade. The Do_Trade routine is where we will insert our code.


If you select Symbol Object from the drop down menu to the right you will see all the properties of a symbol object which you can check. You will see several options which allow you to reference the focus list statistics. Here is an example code snippet that will filter out signals when the Advisor Rating is below 70, or the BTHR(Back Test Hit Rate) is below 60, or the BTNT(Back Test Number of Trades) is below 3. You can add more/less critera as you see fit. Please note that these fields must be in the focus list for this to work. You can add the fields by clicking on the wrench icon at that top of the focus list. The code in bold is what needs to be added.

Public Sub Do_Trade(ByVal oSymbol As SymbolObject, ByVal nSignal As Integer, ByVal sTimeFrame As String, _
ByVal sTradePlan As String, _
ByVal bMinAllocation As Boolean, ByVal fMinAllocation As Single, _
ByVal fMaxAllocation As Single, _
ByVal bMinSharesToTrade As Boolean, ByVal fMinSharesToTrade As Single, _
ByVal bMaxSharesToTrade As Boolean, ByVal fMaxSharesToTrade As Single, _
ByVal bRoundLot As Boolean, ByVal nRoundLot As Integer, _
ByVal sEMailAddress As String, ByVal bEmail As Boolean, ByVal bReverse As Boolean, ByVal bExit As Boolean)

If oSymbol.Adv < 70 _
Or oSymbol.BTHR < 60 _
Or oSymbol.BTNT < 3 Then
LogAction("Symbol did not pass the filter critera.", _
enuLogImportance.enuVerbose) ' Log why signal is being ignored
Exit Sub ' Do not trade
End If


LogAction("Do_Trade: Processing '" & GetSignalName(nSignal) & "' signal on symbol " _
& oSymbol.Symbol, enuLogImportance.enuVerbose) ' Output log
Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


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