Topic: Tutorial: Building Custom Indicator with FSB

Hi All,

I made this custom indicator tutorial to make everyone understand how simple it is actually to make your own custom indicator with Forex Strategy Builder. Download it and have a fun learning.

Warmest Regards
Denny Imanuel

Post's attachments

Custom Indicator Tutorial.pdf 1.02 mb, 1028 downloads since 2010-02-25 

You don't have the permssions to download the attachments of this post.

Re: Tutorial: Building Custom Indicator with FSB

Thanks for your work, but to me the question ìs to put a  meta   * .ex4 ind.  as a custom indicator in FSB
Which will be the way to do that? ... Thanking in advance . Best regards. Jim7

Re: Tutorial: Building Custom Indicator with FSB

zuijaideai wrote:

Hi All,

I made this custom indicator tutorial to make everyone understand how simple it is actually to make your own custom indicator with Forex Strategy Builder. Download it and have a fun learning.

Warmest Regards
Denny Imanuel

Thank you Denny, what is easy for one is not easy for another smile
Definitely it is not easy for me, I hope more people would make new custom indicators to increase possibilities of FSB.

Re: Tutorial: Building Custom Indicator with FSB

I agree.  Also wish to extend thanx to all who freely
give their time and share this program,experience with usTom M.

Re: Tutorial: Building Custom Indicator with FSB

how to put a  meta   * .ex4 ind.  as a custom indicator in FSB
Which will be the way to do that? ... Thanking in advance . Best regards

Re: Tutorial: Building Custom Indicator with FSB

Hi all,

Really geat job.

I suck in Mt4 programing so i decided to convert my used indicator to FSB who is a great soft.

I just discovring that .... i suck too.


Omg

Perhaps a paying service for programation will bi great.

Nice job


Bye

Re: Tutorial: Building Custom Indicator with FSB

Interesting idea Hades, check pm.

Re: Tutorial: Building Custom Indicator with FSB

corrado wrote:

Interesting idea Hades, check pm.

Is someone offering a coding service?

Re: Tutorial: Building Custom Indicator with FSB

@footon

are you interested? suppose I can offer programation service, for a small fee smile

Re: Tutorial: Building Custom Indicator with FSB

corrado wrote:

@footon

are you interested? suppose I can offer programation service, for a small fee smile

How many "clients" have you served already? Is Aroon Crossover your work?

Re: Tutorial: Building Custom Indicator with FSB

There were few and they are happy for the indicators. I did not program aaron crossover.

Re: Tutorial: Building Custom Indicator with FSB

Is this tutorial still good for today's indicators?

Re: Tutorial: Building Custom Indicator with FSB

dfumagalli wrote:

Is this tutorial still good for today's indicators?

Yeah, the main structure hasn't changed, only minor things like added namespaces and few added lines. If you're going to use current standard indicators for modifications, you'll be fine. If you have problems, don't be shy and post them, it's good exercise to have a crack at them, keeps my thinking sharp, and if I fail there'll be others to guide your path, hopefully.

14 (edited by dfumagalli 2016-05-05 16:41:03)

Re: Tutorial: Building Custom Indicator with FSB

footon wrote:
dfumagalli wrote:

Is this tutorial still good for today's indicators?

Yeah, the main structure hasn't changed, only minor things like added namespaces and few added lines. If you're going to use current standard indicators for modifications, you'll be fine. If you have problems, don't be shy and post them, it's good exercise to have a crack at them, keeps my thinking sharp, and if I fail there'll be others to guide your path, hopefully.


Thank you very much!

At the moment I don't have problems but I do have a question and the PDF did not cover it.

Imagine I have a strategy made of 3 pieces (most of my strategies do):

1) Basic indicator(s) logic on timeframe A (in example: 15m chart): moving averages crossing, channel breakout etc.

2) Only if 1) is true then check for a certain pattern on timeframe B (in example: daily or hourly bar). Example: detect an inside bar happened on daily bars NN days before today's session.

3) If 1) and 2) are true then enter short / long position until End Of Day.


How would I implement 2) and 3)'s End Of Day, considering the bars arrays examples I found only deal with timeframe A bars and not with multiple timeframe bars?

I hope I made sense.

Re: Tutorial: Building Custom Indicator with FSB

You do not set period in the indicator. Instead you create it general and select the period from the program's GUI.

You can do the above example with FSB without a custom indicator. FSB opens trades when all entry conditions (indicators) are satisfied, so you don't need to put all conditions in one indicator.

We already have MA Crossover, Inside bar, signal shift (NN bars ago), Short / Long positions....

Post this in the strategy forum and I'll give you an example.

Re: Tutorial: Building Custom Indicator with FSB

If you need an working environment for developing custom indicator, it is best to use this project:  Indicators Included in FSB Pro Distribution

Re: Tutorial: Building Custom Indicator with FSB

dfumagalli wrote:
footon wrote:
dfumagalli wrote:

Is this tutorial still good for today's indicators?

Yeah, the main structure hasn't changed, only minor things like added namespaces and few added lines. If you're going to use current standard indicators for modifications, you'll be fine. If you have problems, don't be shy and post them, it's good exercise to have a crack at them, keeps my thinking sharp, and if I fail there'll be others to guide your path, hopefully.


Thank you very much!

At the moment I don't have problems but I do have a question and the PDF did not cover it.

Imagine I have a strategy made of 3 pieces (most of my strategies do):

1) Basic indicator(s) logic on timeframe A (in example: 15m chart): moving averages crossing, channel breakout etc.

2) Only if 1) is true then check for a certain pattern on timeframe B (in example: daily or hourly bar). Example: detect an inside bar happened on daily bars NN days before today's session.

3) If 1) and 2) are true then enter short / long position until End Of Day.


How would I implement 2) and 3)'s End Of Day, considering the bars arrays examples I found only deal with timeframe A bars and not with multiple timeframe bars?

I hope I made sense.

Like Miroslav said, we have standard indicators for this. Essentially you set up logical condition by choosing first indi, then second etc, and when all those indis satisfy their set conditions at the same time, you'll have a position opened.

Re: Tutorial: Building Custom Indicator with FSB

Hi, I have no problem with the part in the tutorial.  Where I do have a problem is when the code compiles fine but I get an error when I try to add my indicator in the Editor in FSB.  It's saying there's an array out of range and I can't figure out how to debug that.  Can someone please help?  I tried checking the logs and there's nothing.  A window pops up to mail the error but the box to save it is greyed out.   Is there some sort of SDK for the indicators to use it with Visual Studio for debugging?  Is there maybe a log file or debugging mode in FSB I can turn on to see the error?

Thanks!

Re: Tutorial: Building Custom Indicator with FSB

Yes, there is. Please download the code here: https://github.com/PopovMP/FSB_Pro_Indicators

20 (edited by jetaro 2017-01-29 03:13:08)

Re: Tutorial: Building Custom Indicator with FSB

Popov wrote:

Yes, there is. Please download the code here: https://github.com/PopovMP/FSB_Pro_Indicators

Thank you Mr Popov, now I can see exactly where it's erring out! much better.

Took me awhile to figure out that I had to change the indicator in program.cs, but I figured it out smile

Also it didn't work in VS2013, I had to update to VS2015. I really like it!

Re: Tutorial: Building Custom Indicator with FSB

Hello I have a couple of questions. Is the current bar 0 or 62777?

also is there a way to draw an indicator into the future?

Thanks!

22 (edited by jetaro 2017-01-30 15:48:54)

Re: Tutorial: Building Custom Indicator with FSB

also I *think* i mostly figured out how the indicators work to open a trade.

you create a new IndicatorComp, and set the type to IndComponentType.AllowOpenLong. 
Then when that value is a 1 it will open a trade? Is that right?

It's a little hard to read, it's not as clear as in MQL where the code to open a trade is very obvious.

also do the trades open on tick data (intrabar) or bar open? Is that decided by the indicator or FSB?

Lastly, which variable is the current ask or bid price?

Thanks again!
Jim

Re: Tutorial: Building Custom Indicator with FSB

By 'also is there a way to draw an indicator into the future?' do you mean on the indicator chart in FSBPro..?

Ichimoku extends into the future but does not show that extension on the indicator chart.

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: Tutorial: Building Custom Indicator with FSB

Is the current bar 0 or 62777?

We give the data series to the indicator via the Calculate method.

public override void Calculate(IDataSet dataSet)
        {
            DataSet = dataSet;

and can use is later view the DataSet class together with all market settings.

The oldest bar in Data is 0. Te newest bar is Bars-1
Example.
Oldest close is DataSet.Close[0]
Newest (or current if no OOS) DataSet .Close[Bars-1]

The, DataSet is defined in the base Indicator class where we have also "shortcuts" like:

        /// <summary>
        ///     Bar highest price
        /// </summary>
        protected double[] High
        {
            get { return DataSet.High; }
        }

        /// <summary>
        ///     Bar lowest price
        /// </summary>
        protected double[] Low
        {
            get { return DataSet.Low; }
        }

        /// <summary>
        ///     Bar closing price
        /// </summary>
        protected double[] Close
        {
            get { return DataSet.Close; }
        }

So, we can use the price directly with Close[Bars-1].

25 (edited by jetaro 2017-01-31 02:21:27)

Re: Tutorial: Building Custom Indicator with FSB

Blaiserboy wrote:

By 'also is there a way to draw an indicator into the future?' do you mean on the indicator chart in FSBPro..?

Ichimoku extends into the future but does not show that extension on the indicator chart.

Hi Blaiserboy, yes that's what I meant. I wonder if we can trick it by subtracting a certain number from the current bar, which I think I figured out now isn't 0 but is the large number like 62777.

Oh well, doesn't matter. I don't think people use fsb to look at the charts as much as for the strategies anyway.

Can you answer any of my other questions by any chance? Oh nvm, I see Mr Popov just replied smile