GSB Forums

GSB CUSTOM INDICATORS

admin - 27-7-2017 at 01:58 AM

We have completed custom indicators.
http://www.trademaid.info/forum/viewthread.php?tid=17#pid184
Updated docs Jan 16 2018


This means you could have locked and or propriety TS/MC code and use it in GSB.

This is a big job and explains why we have had less updates than usual this week. I hope the first version will be out in the next build.
Under tools, custom indicator

custom.png - 112kB




Attachment: Login to view the details


admin - 29-7-2017 at 03:22 AM

This is out in 32.1 Note on a fast computer, it tool TS 4 minutes to write files.
It will be longer if you have lots more steps in the indicators.
They are found in \Data\Indicators Data\{your symbol names}
Vip if you say use 3 data streams, you MUST have custom indicators on the same 3 data streams.

boosted - 30-7-2017 at 05:40 PM

I just tried using Custom Indicator. My custom indicator doesn't use any OHLC as input. The OHLC is accounted for in a function.

How do I go about using this custom indicator with GSB?

Inputs: NumBars(5) ......there are others but they are only used to draw lines.

The main vars: (listed below)

VOpen = VChart(NumBars,Open);
VHigh = VChart(NumBars,High);
VLow = VChart(NumBars,Low);
VClose = VChart(NumBars,Close);

admin - 30-7-2017 at 06:07 PM

I would assume you would mainly be after the close
If so you would use
vChart
close,x:y:z

Otherwise you could make a function called Vhigh(x,h) etc

boosted - 30-7-2017 at 06:53 PM

VHigh(Numbars, High) is a function already listed under the vars section. The other three listed in vars are functions too.

Assuming I just used one of the 4 functions in the vars section
how would I express this exactly in GSB Custom Indicator?

Static (Fixed) Value? My choice of O, H, L, C goes here I assume

Dynamic (Optimization) Min to Max: -8 to 8 (typical range but can go a little higher and lower depending on Numbars input)

Where within GSB Custom Indicator do I take into account the Numbars input?

admin - 30-7-2017 at 07:40 PM

You dont need to use -8 to 8 as GSB normalizes these numbers internally.
numbars I would do as follows.



vchart.png - 4kB

boosted - 30-7-2017 at 07:54 PM

Quote: Originally posted by admin  
You dont need to use -8 to 8 as GSB normalizes these numbers internally.
numbars I would do as follows.



OK, thanks. I will try that.

boosted - 30-7-2017 at 08:34 PM

I am using 1 Primary Data and 3 Secondary Data streams with GSB Custom Indicator. I created the TS script for my custom indicator and placed in chart with all 4 data streams.

I also have my custom indicator applied to each and every one of the 4 data streams.

In Strategies>Properties for ALL I set Max # bars study to 500 and even tried 501 but get an error.

User runtime error. MaxBarsBack must be set to 500.

Confusing error since I did set to 500 and tried 501 but still getting same error every time.

Any suggestions?

admin - 30-7-2017 at 08:42 PM

i would run this code
once Print( "MaxBarsBack", MaxBarsBack);
and see what it says.
Otherwise just disable this code
{Once
Begin
If MaxBarsBack <> 500 Then
Begin
RaiseRunTimeError("MaxBarsBack (Maximum number of bars strategy will reference) must be set to 500 (from Properties for All button, General tab)");
End;
End;}

boosted - 30-7-2017 at 08:51 PM

Neither one of those options worked. I figured disabling the MaxB check would surely work but it didn't.

Still asking for me to increase MaxB setting (its set at 500 and tried 501 also with no luck).

admin - 30-7-2017 at 09:11 PM

You need to look in the print log, and see what once Print( "MaxBarsBack", MaxBarsBack); says
its not possible for you to continue getting that message if you have disabled
RaiseRunTimeError("MaxBarsBack (Maximum number of bars strategy will reference) must be set to 500 (from Properties for All button, General tab)");

The other option is you have two bits of code running on the same chart

boosted - 30-7-2017 at 09:57 PM

I checked Print log and it said MaxBars 500.

I disabled the code you outlined and the error event is the same...."Please increase the MaxBarsBack Setting.

I double checked Strategies. The Custom Indicator Strategy is the only one ON. It turns off immediately and gives MaxB error.






admin - 30-7-2017 at 10:22 PM

Can you send me the code?

boosted - 30-7-2017 at 10:25 PM

would like me to post it here or to your email?

boosted - 30-7-2017 at 10:36 PM

I sent you the ELD's via email since I did not hear back from you.
I forgot, but will do now, send you my .txt data stream files used.

admin - 30-7-2017 at 11:06 PM

Problem was your code needed maxbars set to number of bars /5 + 100 bars for gsb normalize function.

admin - 31-7-2017 at 12:24 AM

vip. max bars back must be the same in gsb left gui, and the gsb indicator. If this is not the case custom indicators will not work.
The old default was 501, new default is 500

Custom Indicator

emsjoflo - 1-8-2017 at 11:16 PM

Does GSB store the custom indicators as a time series? As a CSV file? If so, can someone post a snippet of the data so I can see how it is formatted? I don't have Tradestation and I've got a custom indicator I calculated with Excel that I'd like to try.

admin - 1-8-2017 at 11:41 PM

Gsb converts from csv to binary. All you need is the csv.
Must be done on all data streams



Attachment: Login to view the details


admin - 2-8-2017 at 07:28 PM

Here is the custom indicator documentation.


Attachment: Login to view the details

Please share what works well so we all can benefit.

cyrus68 - 4-8-2017 at 02:22 AM

After deciphering the doc guide, it seems to me that GSB constructs a new and independent custom indicator based on the values created by the original.

The parameters of the new custom indicator are optimised in GSB and are re-optimised in the walk-forward process.

The new hybrid indicator could very well be superior to the original. But it isn't possible to do a comparison between the original fixed-parameter version and the new customised version within GSB.

The way GSB treats custom indicators is dramatically different from the way Builder does it. In the latter, the parameters are fixed in the EL code you provide. There is no optimisation whatsoever, but you remain strictly with the original indicator.

admin - 4-8-2017 at 04:08 AM

You can always make a GSB custom indicator that has no steps. I don't see the point as its a backwards move.
Your correct about Builder custom indicator being fixed. No other indicator is fixed in GSB or Builder, so why make the exception to custom indicators?
I suspect the only reason they are fixed in Builder is its too hard to make Builder do it. (though its possible)

jptann - 4-8-2017 at 11:31 AM

Peter:

Thanks for the new documentation. I had no issues to implement the new custom indicator method. Far superior to Builder. I just need to work on getting the optimizer to use it. I have some ideas on that, but maybe the indicator is not as great as I have always felt.

Any way to test just the custom indicator for a run? That would be fun to see and well worth the study.

Since the update is a one time thing, and mine took about 10 minutes, I think I will update it weekly. I have to remember that I have to re-run the one time operation when I change time frames, say from 30 minutes to 15 minutes.

I want to do a test on a number of different time frames. Just more on the "to do" list.

Great job on the custom indicator application. If possible, in the future, is there a way to add an option to run additional time frames at the same time. That is, generate files for 30M, 15M, 13M etc. I think allowing three different time frames would be sufficient. No big deal, just a future feature suggestion. It is no issue to run them separately now.

admin - 4-8-2017 at 05:19 PM

Thanks for the kind words on how good the custom indicators are. It was a lot of work that only a percentage of users need.
Next major job is GSB client / server where you can run multiple GSB's. Good for everyone as GSB doesnt drive the CPU fully and if you have the ram, fine to run a few copies at once.


To run multiple time frames, you will have to run in GSB each time frame. I dont see why you need to update weekly. Its fine to leave some room for OOS that GSB hasnt seen.
Might be possible to improve speed by a fast file write dll.

cyrus68 - 5-8-2017 at 03:02 AM

In reply to jptann.

Your custom indicator, when implemented in GSB, is related to the original but takes a new form, and will behave differently. It could be better. It could be worse. This applies to all custom indicators.

moveo - 21-8-2017 at 11:44 AM

I can`t get customindicators in GSB
Tradestation writes files in a folder but
in GSB no customindicator appears

pfad.jpg - 37kB cind.jpg - 36kB

admin - 21-8-2017 at 01:19 PM

Your screen shots are useful. Was the custom indicator made in the same version of GSB as what you are running?
If so zip up the custom indicator file, and send it to me via dropbox or similar, or email if its 10mb or less.
Peter

admin - 21-8-2017 at 05:01 PM

Quote: Originally posted by moveo  
I can`t get customindicators in GSB
Tradestation writes files in a folder but
in GSB no customindicator appears


This is my speculation to what happend.
You created the custom indicator with data1 (only) in GSB. You then run GSB with >1 data stream. (maybe restarted GSB)
Your indicator did not come up in my GSB (2 data streams)
I then ran GSB with one data stream only, then did load custom indicator, and the indicator appeared in GSB.
Normally you dont need to do load custom indicators.
Let me know if this fixes it. The clue was the txt file you sent had only one data stream.

moveo - 22-8-2017 at 11:51 AM

Whatever I try, there doesn`t appear a customindicator in GSB
No different with one or more datafeed applied.
The manual for customindicators says: GSB will convert these to binary later. I don`t get this bin file, only the txt file wich Tradestation writes appears

admin - 22-8-2017 at 01:05 PM

Hi Josef,
I will give you two options.
1) Start the process agin in GSB and see if it works.
Be consistent in how many data streams you have.
2) zip up the entire GSB folder and send to me with a dropbox or similar link. Dont email it.
Save your app settings and optimizer settings into a file, and give me the file names.
Peter

moveo - 23-8-2017 at 01:31 PM

Did initially further search. Seems GSB is inconsistent with
reading price data names.
Relevant areas in screenshots marked in red

prdata.jpg - 46kB gui.jpg - 304kB elcode.jpg - 74kB

admin - 23-8-2017 at 01:45 PM

Quote: Originally posted by moveo  
Did initially further search. Seems GSB is inconsistent with
reading price data names.
Relevant areas in screenshots marked in red


I will look at this in the next few days. Im flying back to Australia today.

cyrus68 - 22-9-2017 at 02:31 AM

There was a reference earlier to an indicator calculated in Excel, with its output in the form of a csv file - let's say on the close of the data series. I don't understand how it can be implemented in GSB as a custom indicator.

In contrast, the example given in the doc is perfectly feasible. In that case, a new indicator is created out of 2 underlying ones with hidden code. They look to me to be Jurik indicators, which I don't use.

The indicator generated in GSB is referencing the underlying Jurik indicators to make its calculations. And, going forward, there would be no problem in making the proper calculations.

As for the Excel indicator, I'm totally in the dark as to how it could be implemented in GSB. Unless an indicator is, first, created in TS, equivalent to the one in Excel. And then GSB can generate a custom indicator referencing the one in TS.

admin - 22-9-2017 at 07:18 PM

try custom indicator, load. If that doesnt work zip up your entire GSB and send me a dropbox or similar link. Dont email it to me. It will get blocked. peterzwag at gmail dot com

admin - 22-9-2017 at 07:20 PM

Quote: Originally posted by cyrus68  


As for the Excel indicator, I'm totally in the dark as to how it could be implemented in GSB. Unless an indicator is, first, created in TS, equivalent to the one in Excel. And then GSB can generate a custom indicator referencing the one in TS.


I have no idea why someone wants to do this, but someone asked and it can be done in the latest beta. (released next week)
I think its because the person who wanted it is not using TS

cyrus68 - 23-9-2017 at 12:16 AM

Linking up with Excel is very innovative. Maybe you can do a little write-up on how it works when the build is released. Thanks

admin - 23-9-2017 at 12:26 AM

I dont see the need for it unless you dont use TS. I will write it up after the user has tested it more.
Basically the indicator file needs to look like this.

Date Time|AI(Close)|AI2(Close)
20170118|160216|-3085.1|-2864.5
20170118|160217|-3085.1|-2864.5
20170118|160218|-3085.1|-2864.5

file name is AI.500.636404145543491561.gsbcustindic.txt
path is
GSB-Workplace-Test\Data (DropBox Shared Folder)\Indicators Data\ES.10.tick.Price

ES.10.tick.Price is the symbol of data1

You need to go to tools , custom indicators & load the data.



Force Use

Gregorian - 22-11-2017 at 11:08 PM

How do we Force Use of a custom indicator? If I set Force Use as a Main indicator in GSB 41.09 to True, as soon as the generate starts, GSB sets it back to False.

admin - 22-11-2017 at 11:20 PM

Quote: Originally posted by Gregorian  
How do we Force Use of a custom indicator? If I set Force Use as a Main indicator in GSB 41.09 to True, as soon as the generate starts, GSB sets it back to False.

This is supposed to work. We will investigate. The programmer is looking into it.

admin - 26-11-2017 at 09:02 PM

Quote: Originally posted by Gregorian  
How do we Force Use of a custom indicator? If I set Force Use as a Main indicator in GSB 41.09 to True, as soon as the generate starts, GSB sets it back to False.

This is a bug. Will pass back to the programmer. Thanks in advance for your patience.

Basic questions

Gregorian - 27-11-2017 at 01:42 PM

In MC at least - haven't tried TS - it seems what we are after is a Custom Function, not a Custom Indicator, because Functions return values, whereas Indicators do not. Or am I missing something?

Is there any particular value range of output values that GSB is looking for, or will the Genetic Evolution take care of determining that? A function could provide anything from true/false to a wide range of numeric values.

My first foray is with a Volume Delta function, whose output is up volume - down volume for the current bar. Of course this can provide a wide range of output values. Just want to make sure GSB can make us of this.

admin - 27-11-2017 at 04:43 PM

Quote: Originally posted by Gregorian  
In MC at least - haven't tried TS - it seems what we are after is a Custom Function, not a Custom Indicator, because Functions return values, whereas Indicators do not. Or am I missing something?

Is there any particular value range of output values that GSB is looking for, or will the Genetic Evolution take care of determining that? A function could provide anything from true/false to a wide range of numeric values.

My first foray is with a Volume Delta function, whose output is up volume - down volume for the current bar. Of course this can provide a wide range of output values. Just want to make sure GSB can make us of this.

You can use any range as GSB normalizes them.