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  2    4
Author: Subject: Swing trading systems
admin
Super Administrator
*********




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

Mood: No Mood

[*] posted on 15-6-2018 at 09:33 PM


Try Dow and try the same code in ts. Make sure no date filters active. If it doesn't go in ts it's possible the range is too low to trigger the systems. In excel you could convert daily code to 390 then export again as csv


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 18-6-2018 at 04:36 PM


I am a bit confused as to how exactly I do this...."In excel you could convert daily code to 390 then export again as csv."

I have SPY390m data that can only go back to July 98' in TS. But if I load up a TS SPY Daily chart I can get data back to Feb 93'.

I tried taking daily SPY data and copy and paste the data into SPY 390m .txt file but GSB won't accept even though looking at the daily data compared to 390m data
it looks the same.

Detailed steps as to how I can take SPY daily data from Feb 93' to June 98' and add to 390m SPY .txt file that works with GSB would be greatly appreciated since the data looks same to me but GSB for some reason not liking it.

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 18-6-2018 at 05:12 PM


Quote: Originally posted by boosted  
I am a bit confused as to how exactly I do this...."In excel you could convert daily code to 390 then export again as csv."

I have SPY390m data that can only go back to July 98' in TS. But if I load up a TS SPY Daily chart I can get data back to Feb 93'.

I tried taking daily SPY data and copy and paste the data into SPY 390m .txt file but GSB won't accept even though looking at the daily data compared to 390m data
it looks the same.

Detailed steps as to how I can take SPY daily data from Feb 93' to June 98' and add to 390m SPY .txt file that works with GSB would be greatly appreciated since the data looks same to me but GSB for some reason not liking it.

Thanks.


look at this data
//daily bars
"Date","Time","Open","High","Low","Close","Vol","OI"
05/07/2018,16:00,266.89,268.02,266.11,266.92,55304907,0


//390 min
"Date","Time","Open","High","Low","Close","Up","Down"
05/07/2018,16:00,266.90,268.02,266.11,266.91,20882710,20715663

they are the same except how volume works. So you could rename a daily bar csv to be es.390.minute.txt
You will have to disable indicators that use volume, or risk mild issue where TS<>GSB. There is only a few and I have had a mental blank as to what ones. I can ask programmer.
My logic for this is 20882710+20715663 <>55304907

If this is rejected by GSB, let me know The issue will be the volume format.


View user's profile View All Posts By User
moveo
Josef
**




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

Mood: No Mood

[*] posted on 20-7-2018 at 07:03 AM



This week I tried to find swing systems on ES.
I had good luck with the first 10 min run GSB.
Very stable oos with only 3 Indicators

perf.jpg - 280kB equity.jpg - 213kB


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 20-7-2018 at 03:42 PM


Quote: Originally posted by moveo  

This week I tried to find swing systems on ES.
I had good luck with the first 10 min run GSB.
Very stable oos with only 3 Indicators


Thats impressive and I'm keen to build some.
Can you publish some settings used. What were results like from 2000 to 2004. I normally use 2000 on-wards.
Did you do market verification tests at all?


View user's profile View All Posts By User
moveo
Josef
**




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

Mood: No Mood

[*] posted on 20-7-2018 at 11:09 PM


I used all data jan 2004 - feb 2017 for training, 2000 stop,
2000 target, all other pretty much GSB standard settings.
Tried nth day feature but had no luck with swing systems.
Sadly I could not repeat it to get a comparable system with this
quality.This is the nature of genetic algorithm.
So the potential in GSB is great, but the art is to
fish it out.

equity1.jpg - 185kB


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




Posts: 15
Registered: 9-4-2021
Member Is Offline


[*] posted on 9-4-2021 at 09:15 AM
It is interesting to know whether there has been progress in research with the swing trade


Quote: Originally posted by moveo  

This week I tried to find swing systems on ES.
I had good luck with the first 10 min run GSB.
Very stable oos with only 3 Indicators



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-4-2021 at 05:22 PM


@moveo SO much has happened in GSB, and its like you have got the star ship enterprise with a entire galaxy to explore.
You should try secondary filter closedlessClosedbpv and also try (separately) the closetohighlow3{v4} secondary filter.
also try closetohighlow3{v4} secondary filter. with these settings. Not sure if they are in your build, but will be when I release the next build < 1 week
I assume you tried long only


tf.png - 185kB


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




Posts: 98
Registered: 15-10-2018
Member Is Offline

Mood: No Mood

[*] posted on 28-9-2021 at 06:44 AM


Hi Peter, I am running a swing system in multicharts with TP & SL of 2000 using inbuilt functions SetStopLoss / SetProfitTarget, don't know if see this in TS but i notices MC seems to track the open profit/loss even outside session time (830 to 1500) I assume as the continuous symbol is pretty much 24 hour, & therefor has exited at stop or profit. Backtests fine but in real time seems to be exiting incorrectly. Wondering if anyone else has issue, thinking I may need to hard code the exits based on price so only calculated during session time? Any thought, dave

View user's profile View All Posts By User
Daniel UK1
Member
***




Posts: 470
Registered: 4-6-2019
Member Is Offline


[*] posted on 28-9-2021 at 02:28 PM


engtraderfx, fwiw, i execute on MC, and for index swings, i use rth custom session time in mc, and only allow execution within rth setting in IB... i also manage stops and target emulation locally... (to avoid cross order issue with i with intraday systems)
In this setup you will not face the issue you are having..

Question is though, what data you have used to build your systems on, 24h ? then you cant use my above setup of course, i only use rth as build data... and not 24h but regulate entry and exit by gsb time setting in left side gui.



View user's profile View All Posts By User
Daniel UK1
Member
***




Posts: 470
Registered: 4-6-2019
Member Is Offline


[*] posted on 28-9-2021 at 02:34 PM


Quote: Originally posted by moveo  
I used all data jan 2004 - feb 2017 for training, 2000 stop,
2000 target, all other pretty much GSB standard settings.
Tried nth day feature but had no luck with swing systems.
Sadly I could not repeat it to get a comparable system with this
quality.This is the nature of genetic algorithm.
So the potential in GSB is great, but the art is to
fish it out.



It might sounds "unlogical" but often using all data, is less good that nth...

Included macros by peter for swings, will provide you with systems far better than what you show, use that as benchmark, that you can try to beat.
(that is hard for swings) since included settings is very good.
Stops i think you will find that 2k for swings will not be good for index.

bidirectional systems for swing index is much more difficult than directional.

Just a few cents of thoughts, good luck.


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 29-9-2021 at 12:06 AM


From memory im using nth 80 for build that converts to nth all when its in the manager.
Systems should appear much better if nth all was used, but thats because nothing is out of sample while my method gives 50% out of sample.
The test would be what the out of sample stats are like between the two methods
Agreed bydirectional is harder. Ive made one but I dont think its as good as the long only.
Thanks for your comments.


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




Posts: 98
Registered: 15-10-2018
Member Is Offline

Mood: No Mood

[*] posted on 29-9-2021 at 04:57 AM


Quote: Originally posted by Daniel UK1  
engtraderfx, fwiw, i execute on MC, and for index swings, i use rth custom session time in mc, and only allow execution within rth setting in IB... i also manage stops and target emulation locally... (to avoid cross order issue with i with intraday systems)
In this setup you will not face the issue you are having..

Question is though, what data you have used to build your systems on, 24h ? then you cant use my above setup of course, i only use rth as build data... and not 24h but regulate entry and exit by gsb time setting in left side gui.



Thanks Daniel, i checked setting & using local emulation, hmm. In MC Quote Manager I just set to full session time & just use MC session time to use data i need for 830-1500. (I do that in case I need data for different session times). Maybe that's how MC works, it seems to keep calculating open profit outside session time? Might look at calculating TP / SL as per Peters code for stops.


View user's profile View All Posts By User
Daniel UK1
Member
***




Posts: 470
Registered: 4-6-2019
Member Is Offline


[*] posted on 29-9-2021 at 06:11 AM


Quote: Originally posted by engtraderfx  
Quote: Originally posted by Daniel UK1  
engtraderfx, fwiw, i execute on MC, and for index swings, i use rth custom session time in mc, and only allow execution within rth setting in IB... i also manage stops and target emulation locally... (to avoid cross order issue with i with intraday systems)
In this setup you will not face the issue you are having..

Question is though, what data you have used to build your systems on, 24h ? then you cant use my above setup of course, i only use rth as build data... and not 24h but regulate entry and exit by gsb time setting in left side gui.




Thanks Daniel, i checked setting & using local emulation, hmm. In MC Quote Manager I just set to full session time & just use MC session time to use data i need for 830-1500. (I do that in case I need data for different session times). Maybe that's how MC works, it seems to keep calculating open profit outside session time? Might look at calculating TP / SL as per Peters code for stops.


First thing you should try to figure out, is what data session did you build on to get the traded system from GSB? if you used 24h data or rth session?

You need to make sure you are using the ame for your real trading of the system in MC.

You control sessioin time in MC from custom session templates used..
If you create a session template that only uses rth, liike 830 - 15 .. then you will only get targets and stops based on that active sessioin.

But check data file you used in GSB, 24 data or rth ? or you used peters data .. i believe then its 830 - 15..

But you really "should" only use your own data, so you can control and make sure you use what it is you actually wants to use..






Thanks received (1):

+1 admin at 2021-09-29 17:43:58
View user's profile View All Posts By User
engtraderfx
Junior Member
**




Posts: 98
Registered: 15-10-2018
Member Is Offline

Mood: No Mood

[*] posted on 30-9-2021 at 07:22 PM


Hi, yes its all built on IQ data with session time 830 to 1500 & use same for custom session time. I use the continuous IQ contract @ES#C as feed & map to current contract in IB (MESZ1 for example). Works fine for day trade systems but noted MC keep calculating real time Profit / Loss outside of session time.

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




Posts: 98
Registered: 15-10-2018
Member Is Offline

Mood: No Mood

[*] posted on 30-9-2021 at 07:23 PM


Hi, yes its all built on IQ data with session time 830 to 1500 & use same for custom session time. I use the continuous IQ contract @ES#C as feed & map to current contract in IB (MESZ1 for example). Works fine for day trade systems but noted MC keep calculating real time Profit / Loss outside of session time.

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 30-9-2021 at 08:11 PM


it might be ok if mc calculates that out of hours, as long as trades dont execute out of hours. Performance reports should not show any a/hours data.
Otherwise if there is a day session es contract, you could try that


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




Posts: 98
Registered: 15-10-2018
Member Is Offline

Mood: No Mood

[*] posted on 17-10-2021 at 05:30 PM


fyi just saw comment by Daniel UK1 on general support post which reflects my experience....stop/profit targets continue to be calculated by MC outside of session time on local emulation which I thought needed as stops/limits we want only executed during session. Just had another one last week hit TP outside session time but should have executed (for higher profit) on open of next bar, interested to see how resolve that issue? Otherwise i may try internal coding for Stop/PT.

"Also, i found out the hard way, that MC calculates stops and targets when using local emulation by using BROKER (NOT your data provider )prices regardless of session time used, so DONT use local emulation if anyone is executing with MC."



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 17-10-2021 at 06:07 PM


@engtraderfx. This is news to me as ts hypothetical reports normally match ts reports extremely close. Could the issue be in forward testing they use the a/h data?
It could be fine to calculate real time profits after hours, as long as you dont take fills out of hours. Are the stop and pt held in the exchange after hours?
Should I document how to use local emulation? No idea what it looks like but a screen shot could be good.
Im not sure if internal coding will fix this issue, but im interest to know if it does.


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




Posts: 98
Registered: 15-10-2018
Member Is Offline

Mood: No Mood

[*] posted on 17-10-2021 at 09:40 PM


Peter, yes the issue is backtests are fine in MC, the issue is as noted MC calculates stops & executes in realtime even outside session time. I haven't found a workaround yet, wanted to work in local mode to prevent overlap of other systems & thought it would work but does't so far. I could try limiting the mapped data for current contract to session time as well but not sure that works or even want to as may need data for other systems. Will try setting up internal coding for profit / stop (similar to existing gsb code i would think), albeit will rely on real time market orders as per local emulation. Will pass on code when I get around to it.

cheers, dave




Thanks received (1):

+1 admin at 2021-10-17 23:01:16
View user's profile View All Posts By User
Daniel UK1
Member
***




Posts: 470
Registered: 4-6-2019
Member Is Offline


[*] posted on 18-10-2021 at 01:59 AM


Entrader, Yeah its a tricky one, local emulation setting in MC can not be used, since MC will use broker feed for sending stops and targets, i.e you used session time is redundant. The stops and targets will hit 24h if using local emulatioin.
So backtests will look fine but live trading not the same.

If this shall work, Only possibility is to emulate stops and targets in the GSB code and not MC, then the session time will be respected.

Peter, i propose that for swing systems this is done by GSB perhaps as an option ? send stops and targets when hit or as now at position entered.


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 18-10-2021 at 02:13 AM


Quote: Originally posted by Daniel UK1  
Entrader, Yeah its a tricky one, local emulation setting in MC can not be used, since MC will use broker feed for sending stops and targets, i.e you used session time is redundant. The stops and targets will hit 24h if using local emulatioin.
So backtests will look fine but live trading not the same.

If this shall work, Only possibility is to emulate stops and targets in the GSB code and not MC, then the session time will be respected.

Peter, i propose that for swing systems this is done by GSB perhaps as an option ? send stops and targets when hit or as now at position entered.

stops after they hit is too dangerous if its if openequity<-stoploss then ... exit
this is upto 30 minute delay on the exit if your on 30 min bars
seems silly you need to code around such a basic issue in MC. after all these years no one has ever brought it to my attention. Does mc support have a fix for this?


View user's profile View All Posts By User
Daniel UK1
Member
***




Posts: 470
Registered: 4-6-2019
Member Is Offline


[*] posted on 19-10-2021 at 02:28 AM


Quote: Originally posted by admin  
Quote: Originally posted by Daniel UK1  
Entrader, Yeah its a tricky one, local emulation setting in MC can not be used, since MC will use broker feed for sending stops and targets, i.e you used session time is redundant. The stops and targets will hit 24h if using local emulatioin.
So backtests will look fine but live trading not the same.

If this shall work, Only possibility is to emulate stops and targets in the GSB code and not MC, then the session time will be respected.

Peter, i propose that for swing systems this is done by GSB perhaps as an option ? send stops and targets when hit or as now at position entered.

stops after they hit is too dangerous if its if openequity<-stoploss then ... exit
this is upto 30 minute delay on the exit if your on 30 min bars
seems silly you need to code around such a basic issue in MC. after all these years no one has ever brought it to my attention. Does mc support have a fix for this?


Sorry Peter, obviously one should not wait to send stop order until bar close.

I think the issue with local emulation have arrised only lately when swing systems was introduced in GSB, and the issue of needing to use "ocal emulation" therefore only came up now, and with this also brought the issue that MC forcing the use of broker price..

I have spoken to MC in length about this, and there is no way around it.
MC uses broker price, either trade or bid,ask, if using local emulation.
Making your session template useless for limiting stops and targets to a certain session.

Only way around this is to adapt code.


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 19-10-2021 at 02:53 AM


what about not having market held orders, and only send order when mc detects a fill. This is the method I used on IBlink.
"If this shall work, Only possibility is to emulate stops and targets in the GSB code and not MC"
I dont know how to adapt the code regardless. you can have a stop keyed to entry price, but I dont see how thats going to fix things.


View user's profile View All Posts By User
Daniel UK1
Member
***




Posts: 470
Registered: 4-6-2019
Member Is Offline


[*] posted on 19-10-2021 at 04:03 AM


Yes we are trying to get away from having market held orders since this is the issue in the first place.

So yes, not having market held orders is the solution, but question is how to solve this in the code itself by GSB.
Local emulation is ruled out as we now know.





View user's profile View All Posts By User
 Pages:  1  2    4

  Go To Top

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