I did a test by adding an extra secondary filter on the GSB NG_DEMO model. I used the momentum of the Net Commercials.
Some background on COT https://www.ireallytrade.com/cotreport.html
The COT data is available from Tradestation:
Results
Percent Profitable from 70.32 to 79.12
Profit factor from 3.64 to 7.72
Average Trade from 369.54 to 558.02
Nr of trades is down to 91 and Net Profit to 50.780. Further research is necessary, but I think it has potential as a filter.
Add this Tradestation Code to your model at the correct positions and add an extra daily datastream:
CommLong = FundValue( CommLongFieldNme, 0, oCommLongErr ) of data(3); // !!! Use daily data here
CommShort = FundValue( CommShortFieldNme, 0, oCommShortErr)of data(3);
if oCommLongErr = fdrOk and oCommShortErr = fdrOk then
Begin
CommNet = CommLong - CommShort;
COTMom=Momentum(CommNet,CommMomDays);
End
Else
Begin
Raiseruntimeerror( !( "Error in Commitments of Traders studies: ") );
End;
// Buy/Sell
If decision = 1 And sfDecision = 1 and COTMom < 0 Then
Begin
Buy("Long entry") 1 contracts this bar on close;
End
Else If decision = -1 And sfDecision = -1 and COTMom > 0 Then
Begin
SellShort("Short entry") 1 contracts this bar on close;
End;
John62 - 28-3-2018 at 04:10 AM
I also did some testing by adding Net Commercials as an extra data input to GSB. Several of the best systems used the COT datastream. You can get the
data from the Tradestation indicator and format it in Excel to the correct format. The sample dataset for NG is attached for your own testing.
Attachment: Login to view the details
rws - 28-3-2018 at 12:10 PM
Very good !admin - 28-3-2018 at 03:10 PM
Whats the symbol for COT. Has anyone tried this on ES market., IE GSBsys1ES or NQ?John62 - 29-3-2018 at 02:11 AM
It is not a separate symbol, it is additional information for each future symbol. You can access it with the Fundvalue function in TradeStation. See
the sample above. I think COT works best for markets with fysical delivery, and not stock indexes. But i did not try yet.admin - 29-3-2018 at 05:38 AM
It is not a separate symbol, it is additional information for each future symbol. You can access it with the Fundvalue function in TradeStation. See
the sample above. I think COT works best for markets with fysical delivery, and not stock indexes. But i did not try yet.
Thanks for that tip.
Please keep me informed on this. John62 - 30-3-2018 at 08:45 AM
Whats the symbol for COT. Has anyone tried this on ES market., IE GSBsys1ES or NQ?
I did a test with GSBsys1ES. I used the COT data of the @SP contract. Because COT needs daily data and GSB 500 bars lookback. I took only trades from
1/1/2006 tot compare the same trading period.
Percent profitable and Average Trade little better, but the profit factor from 2.98 to 3.92!
John62 - 30-3-2018 at 10:04 AM
For your own testing. A complete ES dataset with a COT file for GSB.
For your own testing. A complete ES dataset with a COT file for GSB.
Interesting. It improved long but not short.
I did testing on go long if {all the usual} and close >close[1]
with the inverse for short.
It worked for one GSB system on es, but later when I tried it, worse on another.
What you have done is good, but requires more testing to validate.
I have been thinking about the addition secondary filters that are over due to be implemented. We really want to find SF that are true for all systems
on the market, not just the one that appears to test better. Carl - 4-4-2018 at 01:16 AM
Hi John62,
Just tried your COT on RB.
Do we need a daily bar for COT? Or just one bar per session?
So ie session is 0900-1430, use a 330 min bar for COT?
Thanksrws - 4-4-2018 at 01:35 PM
This rule can have erratic results,
close >close[1]
In general it is believed that a relation between 3 bars can
have some good results. But you often need a bit more.
Here are some test examples in Amibroker, there are better
examples from the Amibroker closed forum but that is not for republishing available.
https://www.wisestocktrader.com/indicators/1139-candlestick-...
this one can enhanced so that it can find the candle stick patterns with the highest profit either over a ticker in seconds till minuts or a portfolio
of thousands of tickers in a couple of hours.
Even better is if you could generate any combination of OHLC between the last 3 bars and combine that with indicators.
I sent you some opensource code that I do not want to post here.
I did a little more testing on ES30 min systems and found close>close[1] to be erratic, so I dont think it was a good idea. We need to test these
concepts on multiple systems to see if they are generally true.rws - 4-4-2018 at 04:26 PM
The best patterns could be found with software that specializes in patterns and the best patterns could be in the example above so a custom indicator
could test them.rws - 4-4-2018 at 05:13 PM
That example is if you want to find a pattern in tradestation or in a custom indicator but if you already know the best patterns you could describe
all the OHLC comparisons of the last few bars and give them a number and have another parameter activate the predefined pattern.cyrus68 - 4-4-2018 at 11:55 PM
I'm not sure how pattern recognition can be included in GSB.
One thing to remember is that systems focused entirely on pattern recognition, based on price action, are essentially parameterless and can't be walk
forwarded.rws - 5-4-2018 at 06:02 AM
If you have the 10 best patterns in a script, and have assigned a parameter to them then it is still parametric. This is the way how I already do
that in Amibroker.curt999 - 5-4-2018 at 12:46 PM
just assign 1 or 0 say for example candlestick patterns it either exists or does not..in the base gsb code result =0 or 1..you would need to output
the custom indicator file in the correct format..John62 - 5-4-2018 at 02:38 PM
Just tried your COT on RB.
Do we need a daily bar for COT? Or just one bar per session?
So ie session is 0900-1430, use a 330 min bar for COT?
Thanks
For RB you have to take the COT based on RB, the data is in Tradestation. The COT report is weekly, i used the daily data (but 5 days have the same
value). Correct about the min.cyrus68 - 6-4-2018 at 02:13 AM
In a walk forward you are optimising parameters. Assigning 0 or 1 to patterns does not create a parameter that is optimisable.rws - 6-4-2018 at 02:34 PM
I still have to test this in GSB but in Amibroker there is no problem at all to do a walk forward with either predefined patterns or search for
calculated best patterns based on any condition like RAR/MD, % wins etc for the next forward loop. It just will use the best pattern of the previous
period based on WF criteria.
I hope I can do this in GSB because I like to know if combining patterns with indicators will show something. Another thing with patterns is that they
are often more stable than indicators at least if you have a couple of predefined patterns that you already have found to be stable over several
tickers or many stocks of the index you are trying to optimize.
rws - 6-4-2018 at 02:47 PM
It is not like assigning 0 or 1 to a pattern
P should be the parameter of which specified pattern to use.
The pattern formula should calculates if the current bar results in a 0 or 1 signal.
If p=1 pattern1
if p=2 pattern2
if p=3 pattern3
The pattern will generate a zero or 1 for every bar and I hope GSB could make something out of this. I still have to figure out custom indicators, I
hope it allows to do things like this.