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  
Author: Subject: GSB CUSTOM INDICATORS
admin
Super Administrator
*********




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

Mood: No Mood

[*] posted on 27-7-2017 at 01:58 AM
GSB CUSTOM INDICATORS


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



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-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.


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 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);


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-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


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 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?


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-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


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 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.


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 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?


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-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;}


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 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).


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-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


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 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.







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-7-2017 at 10:22 PM


Can you send me the code?

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 30-7-2017 at 10:25 PM


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

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 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.


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-7-2017 at 11:06 PM


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

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 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


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 1-8-2017 at 11:16 PM
Custom Indicator


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.

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 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



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 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.


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




Posts: 171
Registered: 5-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 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.


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 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)


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 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.


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 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.


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




Posts: 171
Registered: 5-6-2017
Member Is Offline

Mood: No Mood

[*] posted on 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.


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

  Go To Top

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