admin
Super Administrator
       
Posts: 5069
Registered: 7-4-2017
Member Is Offline
Mood: No Mood
|
|
What do to when GSB <> TS or MC
This is the list of most common reasons.
Session time not the same.
for ES/NQ/EMD/ER we don't use the last 15 minutes.
So you must have a custom session template.
Check for human error of wrong session times, bar interval etc.
Check the data matches. Did you use local time or exchange time?
In TS/MC/GSB you cant mix instruments with different exchange time zones, and so have to use local time.
Local time for GSB users varies depending on your computer time zone.
The best policy is to add all data streams to one chart, then export to GSB. If done on separate charts, there is much more room for human error.
If you cut and paste GSB TS code into an existing strategy thats on a chart, the settings of the old TS code will be applied to the new TS code. This
is a very common error. Simplest fix is to change the inputs: word to vars:
GSB can do this automatically if inputs enabled set to false. See picture below.
Not covered in this post, is debug mode can be enabled. Then the ts code will output a txt file in the same folder as GSB. Then git can compare every
oscillator etc. However in 99% of cases this is not needed.
|
|
|
admin
Super Administrator
       
Posts: 5069
Registered: 7-4-2017
Member Is Offline
Mood: No Mood
|
|
Another thing to look for if you have market on close set to true,
Check your TS/MC code is exiting at close. If not there is something wrong with the match of GSB data time zone and TS data time zone.
You can partly cover this up my adding
setexitonclose; any where in the TS/MC code.
This is automatically done if built in market on close is set to true. (see picture above)
But this issue shows there is still a underling issue.
For example you may have GSB data that has been exported from TS using local time zone, (say gmt -6) but your pc with TS is on local time gmt -5 or
exchange time.
Check also the exit time under tools, contracts list.
|
|
|
admin
Super Administrator
       
Posts: 5069
Registered: 7-4-2017
Member Is Offline
Mood: No Mood
|
|
An New issue came up, if oyur on some time zones, ie Australia. CloseD(1) doesnt work as it should. This is fixed in
GSB builds late July 2018 with change in code.
see below.
//20180716 Closed(1) replaced by closesession(1,1) to fix bug where it doesnt work on some time zones in TS
if closesession(1,1) >0 then gsb_CloseLessPrevCloseD = Close - closesession(1,1) else gsb_CloseLessPrevCloseD = 0; //Tradestation
//if Closed(1) >0 then gsb_CloseLessPrevCloseD = Close - Closed(1) else gsb_CloseLessPrevCloseD = 0; //mulitcharts
|
|
|
admin
Super Administrator
       
Posts: 5069
Registered: 7-4-2017
Member Is Offline
Mood: No Mood
|
|
The above fix will not be default for now as closed(1) is not always the same as closesession(1,1)
There also is a rare issue where TS <>GSB when nth is used. It doesnt occur often. Hoping it will be fixed in build 48.11
|
|
|
petrfin
Junior Member

Posts: 7
Registered: 22-2-2019
Member Is Offline
Mood: No Mood
|
|
Hello,
I am trying to solve following inconsistency GSB > TS
I built strategy using data1=NQ30 and data2=NQ60
NQ data are saved from TS in local timezone, session time 830-1500.
When I apply the code from GSB into TS I see similar trades, but sometimes the entry time in TS is shifted by one bar. I marked some differences in
attachment.
The exit is correct using the same bar and price. So the data should be identical and set in correct format.
Anybody has similar experience and have any advice how to synchronize the trades?
Thank you,
Petr
|
|
|
admin
Super Administrator
       
Posts: 5069
Registered: 7-4-2017
Member Is Offline
Mood: No Mood
|
|
Quote: Originally posted by petrfin  | Hello,
I am trying to solve following inconsistency GSB > TS
I built strategy using data1=NQ30 and data2=NQ60
NQ data are saved from TS in local timezone, session time 830-1500.
When I apply the code from GSB into TS I see similar trades, but sometimes the entry time in TS is shifted by one bar. I marked some differences in
attachment.
The exit is correct using the same bar and price. So the data should be identical and set in correct format.
Anybody has similar experience and have any advice how to synchronize the trades?
Thank you,
Petr
|
are you certain the data from the chart = whats in gsb.
Rollover, data changes etc mean ts data is 99% the same (ignore rollover offset)
Are the total performance metrics 99%+ the same?
There are ways to diagnose this exactly in GSB, but a bit time consuming.
All indicators and data are written to a file on ts and gsb. Then git is used to compare
|
|
|
petrfin
Junior Member

Posts: 7
Registered: 22-2-2019
Member Is Offline
Mood: No Mood
|
|
I am pretty sure I have data from chart in gsb, but the total performance metrics are quite different. So there must be some mistake somewhere.
How can I compare the data?
I can see that the price data are included when I do "export to portfolio analytics" in gsb and save entire report to xml in TS.
But they are in different formats, co how can you use git to compare?
How do you decode year in .pa format?
I can see rows like:
43467,1500,Sell ,SsnDyCls,1,6464
43470,900,2580,0,0,0,317,0,h:6489.5,l:6449.75
43478,930,Buy ,Long entry,1,6669
43478,1000,2580,140,1,1,317,6669,h:6680.5,l:6658.75
43478,1030,2580,70,1,1,317,6669,h:6681.75,l:6665
43478,1100,2580,655,1,1,317,6669,h:6704.5,l:6669.25
43478,1130,2580,745,1,1,317,6669,h:6716.5,l:6701.25
43478,1200,2580,655,1,1,317,6669,h:6708.75,l:6697.5
43478,1230,2580,735,1,1,317,6669,h:6708.25,l:6699.25
43478,1300,2580,730,1,1,317,6669,h:6712.25,l:6702
43478,1330,2580,35,1,1,317,6669,h:6713.5,l:6668.5
43478,1400,2580,355,1,1,317,6669,h:6688.25,l:6656.5
43478,1430,2580,555,1,1,317,6669,h:6702.25,l:6683.5
43478,1500,Sell ,SsnDyCls,1,6709
Is is correct that the row with "900" hour has year "43470" and the following rows have year "43478"? This was copy from .pa file.
Thank you.
|
|
|
admin
Super Administrator
       
Posts: 5069
Registered: 7-4-2017
Member Is Offline
Mood: No Mood
|
|
Quote: Originally posted by petrfin  | I am pretty sure I have data from chart in gsb, but the total performance metrics are quite different. So there must be some mistake somewhere.
How can I compare the data?
I can see that the price data are included when I do "export to portfolio analytics" in gsb and save entire report to xml in TS.
But they are in different formats, co how can you use git to compare?
How do you decode year in .pa format?
I can see rows like:
43467,1500,Sell ,SsnDyCls,1,6464
43470,900,2580,0,0,0,317,0,h:6489.5,l:6449.75
43478,930,Buy ,Long entry,1,6669
43478,1000,2580,140,1,1,317,6669,h:6680.5,l:6658.75
43478,1030,2580,70,1,1,317,6669,h:6681.75,l:6665
43478,1100,2580,655,1,1,317,6669,h:6704.5,l:6669.25
43478,1130,2580,745,1,1,317,6669,h:6716.5,l:6701.25
43478,1200,2580,655,1,1,317,6669,h:6708.75,l:6697.5
43478,1230,2580,735,1,1,317,6669,h:6708.25,l:6699.25
43478,1300,2580,730,1,1,317,6669,h:6712.25,l:6702
43478,1330,2580,35,1,1,317,6669,h:6713.5,l:6668.5
43478,1400,2580,355,1,1,317,6669,h:6688.25,l:6656.5
43478,1430,2580,555,1,1,317,6669,h:6702.25,l:6683.5
43478,1500,Sell ,SsnDyCls,1,6709
Is is correct that the row with "900" hour has year "43470" and the following rows have year "43478"? This was copy from .pa file.
Thank you. |
pa and gsb used to use julian date. (a function in ts)
now pa supports both, but gsb still does julian.
I will get gsb to be changed.
Best send me teamviewer details. Your going to sleep soon and I am out for most of the day. send me TV details in 22 hours or so.
There are diag features in gsb on the left side. The gsb manual has this explained in brief detail.
|
|
|
petrfin
Junior Member

Posts: 7
Registered: 22-2-2019
Member Is Offline
Mood: No Mood
|
|
Just to summarize the solution - at the end I had some strange difference in data.
I regenerate the data and GSB works fine now.
If someone has similar problems a good way might be look on the data through diag features as Peter recommended.
|
|
|
|