GSB Forums

Not logged in [Login - Register]

Futures and forex trading contains substantial risk and is not for every investor. An investor could
potentially lose all or more than the initial investment. Risk capital is money that can be lost without
jeopardizing ones’ financial security or life style. Only risk capital should be used for trading and only
those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of
future results
Go To Bottom

Printable Version  
 Pages:  1    3  4
Author: Subject: Swing trading systems
jptann
Member
***




Posts: 101
Registered: 13-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 6-8-2017 at 05:07 PM
Swing trading systems


Peter:

I wanted to run some studies on swing trading. I turned the Market on close to false, but I'm not getting any systems. I lowered the PF but increased the minimum NP in the settings, also included and increase in a number of trades. Did I just make the criteria too difficult or is there some other switches that need to be modified.

Thanks


View user's profile View All Posts By User
admin
Super Administrator
*********




Posts: 5060
Registered: 7-4-2017
Member Is Offline

Mood: No Mood

[*] posted on 7-8-2017 at 01:47 AM


Swing wont work as well as moc for ES. Start by putting appsettings - allowing alloos to pass. (alloosallow.txt)
Allow the training metrics under app settings to be loose too, then tighten them up as you get some systems coming.


View user's profile View All Posts By User
crazyhedgehog
Junior Member
**




Posts: 14
Registered: 9-5-2017
Member Is Offline

Mood: No Mood

[*] posted on 7-8-2017 at 01:38 PM


I managed to build swing systems for US/S/W etc so can be done. Best is to do as Peter suggested and also try different fitness formulas to see which one gives higher % of systems that pass OOS (at least that's the approach I use).

View user's profile View All Posts By User
jptann
Member
***




Posts: 101
Registered: 13-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 8-8-2017 at 02:17 PM


Peter:

Using your suggestions I had no issue getting some strategies. I was asking for too many trades. The good news is that all the good looking trades utilized my proprietary indicator that I have been using for the last 20 years, so it did give me a good feeling about what I have been doing.

Your system came back with many fewer trades (400 trades) since 2000 or around 20 per month. The good news is that it was earning a little more than $10K per year and the out of sample validation trades continued in this vain. Of course the drawdown was more than I want but that can be mitigate within a portfolio.

Good job on the custom indicator implementation. Big improvement for swing systems.

None of the day trading systems use the indicator and I believe that is because the indicator reacts too slow. I need to investigate a faster version of it and will try that next.


View user's profile View All Posts By User
admin
Super Administrator
*********




Posts: 5060
Registered: 7-4-2017
Member Is Offline

Mood: No Mood

[*] posted on 9-8-2017 at 04:56 AM


Please keep us informed with your progress. Im happy its working well.

View user's profile View All Posts By User
emsjoflo
Junior Member
**




Posts: 39
Registered: 7-7-2017
Member Is Offline

Mood: No Mood

[*] posted on 11-8-2017 at 05:02 AM


What should I name a daily file? What time and hour/minute format? I tried load a daily txt file that I had working on an earlier version of GSB and it makes GSB version 34.9 crash

View user's profile View All Posts By User
admin
Super Administrator
*********




Posts: 5060
Registered: 7-4-2017
Member Is Offline

Mood: No Mood

[*] posted on 11-8-2017 at 05:05 AM


user need something like ES.1440.Minutes.anything.txt, assuming you have 1440 minutes in a day.
Daily ok for data2, but I dont think it will wok, or work well with data1. Untested by me but thats my gut reaction.


View user's profile View All Posts By User
emsjoflo
Junior Member
**




Posts: 39
Registered: 7-7-2017
Member Is Offline

Mood: No Mood

[*] posted on 11-8-2017 at 05:19 AM


It was trying version 34.9. It seems to be working on ver.32.7

View user's profile View All Posts By User
admin
Super Administrator
*********




Posts: 5060
Registered: 7-4-2017
Member Is Offline

Mood: No Mood

[*] posted on 11-8-2017 at 05:35 AM


Filename format changed in 34.9 to acomadate seconds

View user's profile View All Posts By User
emsjoflo
Junior Member
**




Posts: 39
Registered: 7-7-2017
Member Is Offline

Mood: No Mood

[*] posted on 11-8-2017 at 05:39 AM


Got it working with daily data. I had to add the symbol to the Contracts list. (Menu:Tools/Contract List)

View user's profile View All Posts By User
jptann
Member
***




Posts: 101
Registered: 13-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 11-8-2017 at 11:22 AM


Peter:

I was using 33.1 and had the day trading system marked. I used an ES file for 29M with time of 0845_1503, all central time. The runs produced in the GSB did not reflect the set exit on close correctly and had many trades that went for many days. I said maybe I needed to calculate the time closes differently, but when I picked one of the strategies and placed it in TS, the set exit on close worked perfectly. Of course, I got different results, but there may be a bug in the GSB version they way it recognizes and end of day marker. I made sure the times were Exchange times and also this last bar would indicate an end of day as I set up the TS data stream.

I will go back to using 30 minute files. Seems to not have an issue with these, but different time frames around 30M are interesting since the whole world is on 30M bars


View user's profile View All Posts By User
emsjoflo
Junior Member
**




Posts: 39
Registered: 7-7-2017
Member Is Offline

Mood: No Mood

[*] posted on 11-8-2017 at 12:18 PM


Has anyone been able to get any results with daily data? I'm not getting any trades. I thought I had it working with an earlier version but the versions earlier than 30.0 say the code is too old to run.


View user's profile View All Posts By User
admin
Super Administrator
*********




Posts: 5060
Registered: 7-4-2017
Member Is Offline

Mood: No Mood

[*] posted on 11-8-2017 at 11:40 PM


Quote: Originally posted by jptann  
Peter:

I was using 33.1 and had the day trading system marked. I used an ES file for 29M with time of 0845_1503, all central time. The runs produced in the GSB did not reflect the set exit on close correctly and had many trades that went for many days. I said maybe I needed to calculate the time closes differently, but when I picked one of the strategies and placed it in TS, the set exit on close worked perfectly. Of course, I got different results, but there may be a bug in the GSB version they way it recognizes and end of day marker. I made sure the times were Exchange times and also this last bar would indicate an end of day as I set up the TS data stream.

I will go back to using 30 minute files. Seems to not have an issue with these, but different time frames around 30M are interesting since the whole world is on 30M bars

Go to tools, contracts list and make sure the session close time is 1503


View user's profile View All Posts By User
boosted
Junior Member
**




Posts: 73
Registered: 16-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 12-6-2018 at 01:30 PM
Swing Trade issues


I'm trying to build a very simple swing trade test strategy for pre-processing using SPY as Dat1 and various cash/indexes as Data2.

My app settings are alloos default app. The opt. settings are mostly default with some very minor changes including changing Quantity since SPY is the Data1 tradeable.

The problem I am having is that every single trade that opens will close same day at close, which is not swing trading but day trading. I tried turning Market on Day Close to true and false and tried Minutes option also. I have Times of Day set to 16:00:00 for exit but would prefer exit and entry to be determined by GSB and whatever entry and exit times (open or close of day) it finds to be best.

For the life of me I cannot figure out why its closing every trade same day its opened. I have read through many forum posts, read documentation on this subject (very sparse) and haven't had any luck getting it to carry a position past the day of entry into the future.

I don't want to use Target or Stop Loss options, I simply want GSB only to enter and exit trades at open or close of day, also allow the trade to stay open for days not close it out EOD all the time (perplexing why it does this). I want to force GSB to only open or close a position at market open or market close, whatever it deems most suitable for the swing trade. I can easily do this in TS but can't seem to get GSB to do this.

Also, I found I can't use SPY390m in Data1 and an index with 390m in Data2 and find any systems.

Any help is appreciated.


View user's profile View All Posts By User
admin
Super Administrator
*********




Posts: 5060
Registered: 7-4-2017
Member Is Offline

Mood: No Mood

[*] posted on 12-6-2018 at 04:10 PM


Quote: Originally posted by boosted  
I'm trying to build a very simple swing trade test strategy for pre-processing using SPY as Dat1 and various cash/indexes as Data2.

My app settings are alloos default app. The opt. settings are mostly default with some very minor changes including changing Quantity since SPY is the Data1 tradeable.

The problem I am having is that every single trade that opens will close same day at close, which is not swing trading but day trading. I tried turning Market on Day Close to true and false and tried Minutes option also. I have Times of Day set to 16:00:00 for exit but would prefer exit and entry to be determined by GSB and whatever entry and exit times (open or close of day) it finds to be best.

For the life of me I cannot figure out why its closing every trade same day its opened. I have read through many forum posts, read documentation on this subject (very sparse) and haven't had any luck getting it to carry a position past the day of entry into the future.

I don't want to use Target or Stop Loss options, I simply want GSB only to enter and exit trades at open or close of day, also allow the trade to stay open for days not close it out EOD all the time (perplexing why it does this). I want to force GSB to only open or close a position at market open or market close, whatever it deems most suitable for the swing trade. I can easily do this in TS but can't seem to get GSB to do this.

Also, I found I can't use SPY390m in Data1 and an index with 390m in Data2 and find any systems.

Any help is appreciated.


Try turning secondary filters off. If that doesnt work do a support upload. (under help) Its been maybe six months since I tried to do what your doing, so very rusty on it.


View user's profile View All Posts By User
jptann
Member
***




Posts: 101
Registered: 13-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 13-6-2018 at 12:44 PM


I think the issue is with your exit time for SPY. I work in commodities, so not sure. Is the last bar for SPY end at 4PM East Coast Time or does it trade further into the overnight market. Finally, is you are doing a swing trade, are you using after hour trading as part of your data? This will influence the system. Make sure your day trading switches are off. That is, do not close at the end of the day trading or use the "set market on close" instructions.

One final idea. Are you using limit trades. Sometimes you can't be assured of a trade, so I would recommend no limit trades and some reasonable slippage for each market trade implemented. Its been a long time since I traded stocks so I'm not sure what a good slippage would be, but you should have some negative impact to the system when you input a market order at the open of the next bar. There is no assurance that you can get that market price, so the way to handle this is to go back in your actual trading history and see what the SPY slippage is. It may be trivial, like $0.01 but on the ES (futures) 1/2 of a tick for each market order is what I have averaged over the last 20 years. So I charge each of the contracts I trade a very healthy commission ($1.50 per side per contract) along with a $6.25 slippage for each side per contract. My experience is that with these type of costs figured in, high frequency "scalp" type trades are not available to me and I need to do a lot more work. Since I only work on commodities, I suspect your issue is how SPY is set up in GSB and how you use any custom time frames for closing the trade or trading in the after market. Hope this helps somewhat. Peter is usually very good about his response, unless he is traveling somewhere out of Australia.


View user's profile View All Posts By User
Carl
Member
***




Posts: 342
Registered: 10-5-2017
Member Is Offline

Mood: No Mood

[*] posted on 13-6-2018 at 01:35 PM


Earlier today I started four GSB runs to build four sets of swing trading systems.
Bar sizes 30, 60, 60 and 120 minutes. Only data1, no data2.

Switched off the Market on close exit. Am using a stoploss and a profit target twice the stoploss.

In this case I don't care when the entry is and when the exit.

Everything seems to work okay.

I wonder if it is possible to set GSB to build swing strategies that only trade on open or on close?


View user's profile View All Posts By User
boosted
Junior Member
**




Posts: 73
Registered: 16-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 13-6-2018 at 02:09 PM


Quote: Originally posted by jptann  
I think the issue is with your exit time for SPY. I work in commodities, so not sure. Is the last bar for SPY end at 4PM East Coast Time or does it trade further into the overnight market. Finally, is you are doing a swing trade, are you using after hour trading as part of your data? This will influence the system. Make sure your day trading switches are off. That is, do not close at the end of the day trading or use the "set market on close" instructions.

One final idea. Are you using limit trades. Sometimes you can't be assured of a trade, so I would recommend no limit trades and some reasonable slippage for each market trade implemented. Its been a long time since I traded stocks so I'm not sure what a good slippage would be, but you should have some negative impact to the system when you input a market order at the open of the next bar. There is no assurance that you can get that market price, so the way to handle this is to go back in your actual trading history and see what the SPY slippage is. It may be trivial, like $0.01 but on the ES (futures) 1/2 of a tick for each market order is what I have averaged over the last 20 years. So I charge each of the contracts I trade a very healthy commission ($1.50 per side per contract) along with a $6.25 slippage for each side per contract. My experience is that with these type of costs figured in, high frequency "scalp" type trades are not available to me and I need to do a lot more work. Since I only work on commodities, I suspect your issue is how SPY is set up in GSB and how you use any custom time frames for closing the trade or trading in the after market. Hope this helps somewhat. Peter is usually very good about his response, unless he is traveling somewhere out of Australia.


Yes, I always put commish and slippage in every backtest no matter what. In this case I used 390m SPY data1 and SPX data2. I did finally get it to work today. I did turn off Market on Close (I did this before with no luck) and was able to keep Secondary Filter Enabled. Who knows why it finally decided to give some systems. Also, it did hold positions for multiple days. Thanks for you input jptann.


View user's profile View All Posts By User
boosted
Junior Member
**




Posts: 73
Registered: 16-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 13-6-2018 at 02:21 PM


Quote: Originally posted by Carl  
Earlier today I started four GSB runs to build four sets of swing trading systems.
Bar sizes 30, 60, 60 and 120 minutes. Only data1, no data2.

Switched off the Market on close exit. Am using a stoploss and a profit target twice the stoploss.

In this case I don't care when the entry is and when the exit.

Everything seems to work okay.

I wonder if it is possible to set GSB to build swing strategies that only trade on open or on close?


Good ideas for me to keep in mind when putting together a swing trade GSB.

I only want to open and close trades at the open or close of market. I was able to get it to open and close at close of day using 390m data1 and 2. Unfortunately I dont know of any way to force GSB to open or close trades at open of day.

Good thing is I got it to finally work. The downside is no GSB strats were as profitable and good as a very crued simple one I put together on TS using only one indicator. I would think considering the brute power and complexity of GSB it would at the very least come up with one of many strategies that met or exceeded the simple one indicator I built. Very odd.

I have a question for you Carl. Is it possible to build swing strats using 390m as Data1 and a combo of smaller time frames on Data 2?

By the way, thanks for chiming in, you too jp. Nice that others are here to help others.


View user's profile View All Posts By User
admin
Super Administrator
*********




Posts: 5060
Registered: 7-4-2017
Member Is Offline

Mood: No Mood

[*] posted on 13-6-2018 at 04:15 PM


[rquote]

I only want to open and close trades at the open or close of market. I was able to get it to open and close at close of day using 390m data1 and 2. Unfortunately I dont know of any way to force GSB to open or close trades at open of day.
[/rquote]
Currently GSB is using only market on close orders. Limits,stop and open planed but the exits and additional secondary filter is likely next after the multidata frame trading.
The mutidata frame is close to finished, but stops and secondary filters are a big job to complete


View user's profile View All Posts By User
boosted
Junior Member
**




Posts: 73
Registered: 16-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 13-6-2018 at 06:45 PM


sounds good Peter. Look forward to the new multidata feature.

Thanks for update


View user's profile View All Posts By User
boosted
Junior Member
**




Posts: 73
Registered: 16-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 15-6-2018 at 10:56 AM


UPDATE: Once I got the SPY 390m Data1 and Data2 working I found something else that seems odd with the strategy results that I hope somebody can offer an explanation.

Issue: I am using SPY 390m data since its inception (Feb 93'). Strategy backtest bars is set to 500 in GSB and TS. When GSB produces thousands of strategies every single one I looked at (at least 100+) all have first trade date in June/July of 2004. This is a swing trade system. I dont have stops, profit targets or anything else of any significance that would cause GSB to require 11yrs of data to produce its first trade. That is extremely odd.

Can anyone offer an explanation behind why this might be. I figured I would start seeing trade results starting in mid to late 95' at minimum and 96' for sure.

Is there some logic in GSB causing this oddity?

Thanks.



View user's profile View All Posts By User
admin
Super Administrator
*********




Posts: 5060
Registered: 7-4-2017
Member Is Offline

Mood: No Mood

[*] posted on 15-6-2018 at 03:40 PM


Quote: Originally posted by boosted  
UPDATE: Once I got the SPY 390m Data1 and Data2 working I found something else that seems odd with the strategy results that I hope somebody can offer an explanation.

Issue: I am using SPY 390m data since its inception (Feb 93'). Strategy backtest bars is set to 500 in GSB and TS. When GSB produces thousands of strategies every single one I looked at (at least 100+) all have first trade date in June/July of 2004. This is a swing trade system. I dont have stops, profit targets or anything else of any significance that would cause GSB to require 11yrs of data to produce its first trade. That is extremely odd.

Can anyone offer an explanation behind why this might be. I figured I would start seeing trade results starting in mid to late 95' at minimum and 96' for sure.

Is there some logic in GSB causing this oddity?

Thanks.

Do you have closed secondary filter enabled? Try it disabled.
Try the dow data instead.(build new systems on it)
You could also try verification data on the dow.
I build day trading system since 1997 or 2000 on ES, so suspect you have a data issue.
Try puting a system out of GSB to ts, make sure no date filters are active in the code, and see if it trades.


View user's profile View All Posts By User
boosted
Junior Member
**




Posts: 73
Registered: 16-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 15-6-2018 at 04:52 PM


I built the strategies with Closed secondary filter disabled. It had no problem building thousands of strategies.

I dumped a random strategy that was built by GSB into TS and first trade was exactly as I described before, first trade June/July 2004 instead of what I would of expected June/July 2000.

I then followed your instructions and commented out the begin date portion of the code and sure enough first trade started in June 2000 so that is what I would of expected
from GSB instead of trades starting in June 2004.

So I am curious now. Why did GSB put a begin date in the final code of June 2004? I used default opt. settings dates (1900-2100) so
not sure what the GSB logic was to place begin date June 2004 into code.

Also, I am now wondering if GSB built all of the strategies correctly using the data from inception of SPY. My data file starts with inception of SPY, which is July 98'. I double checked my data file
and everything looks correct (start and end dates for data).

So I am now left wondering if GSB logic is working correctly.

Any thoughts?


View user's profile View All Posts By User
boosted
Junior Member
**




Posts: 73
Registered: 16-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 15-6-2018 at 05:07 PM


sorry, made a mistake.

I was looking at a true SPY daily chart vs the SPY 390m chart.

Why is it when I open a SPY 390m chart the max data I get is July 98' whereas if I open a true daily bar SPY chart it goes back to inception Feb 93'. That is a big difference. That means GSB won't ever look at data prior to July 98 because GSB only accepts 390m chart data not a true Daily chart data stream, correct?

But my orignal commentarty about the begin date GSB trades remains that same.




Thanks received (1):

+1 LucaRicatti at 2021-10-31 10:33:35
View user's profile View All Posts By User
 Pages:  1    3  4

  Go To Top

Trademaid forum. Software tools for TradeStation, MultiCharts & NinjaTrader
[Queries: 67] [PHP: 31.8% - SQL: 68.2%]