Re: Custom Indicators Development

ahmedalhoseny wrote:

Regarding to the way the indicator coded it  affects the speed of generator speed

Some times the indicator coded and gives the right results but in a way that slow down the speed

So wee need a guidance and best practices how to avoid that with custom indicators


Example for that is Fractal dimension index FDI  When i load the indicator and link the slot to be sure it still exist
then run the generator it moves so horribly slow

Try to optimize the code for speed. If you can find ways to optimize the code, you can uncover plenty of time. Custom indis here are quite condensed already, so it will be quite hard I think. I remember a project where I could cut down a 15sec calc time to less than 3, and if I'd tried really hard, I'd have probably cut that 3sec in half additionally, but this is quite extreme example, most commonly available indis are much more simple and short, therefore not much to optimize and gain.

Re: Custom Indicators Development

footon wrote:
ahmedalhoseny wrote:

Regarding to the way the indicator coded it  affects the speed of generator speed

Some times the indicator coded and gives the right results but in a way that slow down the speed

So wee need a guidance and best practices how to avoid that with custom indicators


Example for that is Fractal dimension index FDI  When i load the indicator and link the slot to be sure it still exist
then run the generator it moves so horribly slow

Try to optimize the code for speed. If you can find ways to optimize the code, you can uncover plenty of time. Custom indis here are quite condensed already, so it will be quite hard I think. I remember a project where I could cut down a 15sec calc time to less than 3, and if I'd tried really hard, I'd have probably cut that 3sec in half additionally, but this is quite extreme example, most commonly available indis are much less simple and short, therefore not much to optimize and gain.

After checking the FDI indicator i found

// The CheckBox parameters
            IndParam.CheckParam[0].Caption = "Use previous bar value.";
           [b]IndParam.CheckParam[0].Checked = (slotType == SlotTypes.OpenFilter);[/b]
            IndParam.CheckParam[0].Enabled = false;
            IndParam.CheckParam[0].ToolTip = "Use the indicator value from the previous bar.";
        

and this

[b]int       iPrvs     = (SlotType == SlotTypes.OpenFilter) ? 1 : 0;[/b]

Why the lines in bold are here !!  i didnot get it also IS the Enabled = false; makes it repainting ?
Note : the indicator in repository!!!

Re: Custom Indicators Development

Repainting is not the right word here. If it's openfilter, previous bar is used, otherwise not. Should trade fine, me thinks. Have you made checks to see if trading matches back-test?

Re: Custom Indicators Development

footon wrote:

Repainting is not the right word here. If it's openfilter, previous bar is used, otherwise not. Should trade fine, me thinks. Have you made checks to see if trading matches back-test?

I didnot complete any test using that indicator  it frozen my generator evry time i use it in generator am i the only one or this is normal behavior of this one and i have to live with it ? the benchmark drops to 5 !!!!!

Re: Custom Indicators Development

ahmedalhoseny wrote:
footon wrote:

Repainting is not the right word here. If it's openfilter, previous bar is used, otherwise not. Should trade fine, me thinks. Have you made checks to see if trading matches back-test?

I didnot complete any test using that indicator  it frozen my generator evry time i use it in generator am i the only one or this is normal behavior of this one and i have to live with it ? the benchmark drops to 5 !!!!!

Oh, that's not normal, should be looked into it. You can use my version instead, I think I used a different source though.

Re: Custom Indicators Development

footon wrote:
ahmedalhoseny wrote:
footon wrote:

Repainting is not the right word here. If it's openfilter, previous bar is used, otherwise not. Should trade fine, me thinks. Have you made checks to see if trading matches back-test?

I didnot complete any test using that indicator  it frozen my generator evry time i use it in generator am i the only one or this is normal behavior of this one and i have to live with it ? the benchmark drops to 5 !!!!!

Oh, that's not normal, should be looked into it. You can use my version instead, I think I used a different source though.

many thanks in advance footon iam waiting your intervention ,

Note : when i reduce the number from 30 to 5 or 3 for example the speed go some how faster !!!

Re: Custom Indicators Development

ahmedalhoseny wrote:

many thanks in advance footon iam waiting your intervention ,
Note : when i reduce the number from 30 to 5 or 3 for example the speed go some how faster !!!

The indi is fine, at least in backtester, optimizer, generator. I'm pretty confident trades match after-the-fact backtest also.

Maybe you should look for a more powerful computer? Maybe it runs better for me because I still run FSB on XP?

The calc is not overly heavy, but it has some tricks it needs to do. I'm thinking how you could adjust it for performance - probably you could try changing the level parameter. Change line 82 to this:

IndParam.NumParam[1].Point   = 1;

By this you reduce the number of combinations massively, I don't think having 1.5 instead of 1.53 is a terrible loss, quite possibly it reduces the curve-fitting footprint, if you will, as well. Report back, it's interesting to hear your results.

Re: Custom Indicators Development

It seems that this project will not have the desired effect, so I'll stop the further development for now.

The provided code is already useful to develop custom indicators in a programmer's friendly environment.

Re: Custom Indicators Development

ahmedalhoseny wrote:
footon wrote:
ahmedalhoseny wrote:

I didnot complete any test using that indicator  it frozen my generator evry time i use it in generator am i the only one or this is normal behavior of this one and i have to live with it ? the benchmark drops to 5 !!!!!

Oh, that's not normal, should be looked into it. You can use my version instead, I think I used a different source though.

many thanks in advance footon iam waiting your intervention ,

Note : when i reduce the number from 30 to 5 or 3 for example the speed go some how faster !!!

I tested both fractal dimention index also i tested FDI indicator as well both slow down the speed

attached 1 minute generator running using only 7000 bars

Post's attachments

1 minute 7000 bars.gif
1 minute 7000 bars.gif 4.08 kb, file has never been downloaded. 

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

Re: Custom Indicators Development

Popov wrote:

It seems that this project will not have the desired effect, so I'll stop the further development for now.

The provided code is already useful to develop custom indicators in a programmer's friendly environment.

Its OK but may you add some Logics , functions and new indicators types to the existing structure !!!!

Re: Custom Indicators Development

Its OK but may you add some Logics , functions and new indicators types to the existing structure !!!!

I just now said that I'll not add any additional ready models. You have to program them yourself.

The existing structure is not limiting you in doing any of those.

Re: Custom Indicators Development

ahmedalhoseny wrote:
ahmedalhoseny wrote:
footon wrote:

Oh, that's not normal, should be looked into it. You can use my version instead, I think I used a different source though.

many thanks in advance footon iam waiting your intervention ,

Note : when i reduce the number from 30 to 5 or 3 for example the speed go some how faster !!!

I tested both fractal dimention index also i tested FDI indicator as well both slow down the speed

attached 1 minute generator running using only 7000 bars

It's not erroneous after all, is it. You have to accept the fact indicators are different, some need more power, i.e are slower to calculate. If it's unacceptable, avoid them.

Did you implement the change I suggested? How does it affect the speed?

Re: Custom Indicators Development

Popov wrote:

It seems that this project will not have the desired effect, so I'll stop the further development for now.

The provided code is already useful to develop custom indicators in a programmer's friendly environment.

You should have kept quiet on this, just chipping away at it until it would have been finished. And then a big presentation! Reaction would have been totally different  wink

Jokes aside, I couldn't attend your skype chat on Sunday, although this topic is off the table for now, can you publish it (if it was chat-only)?

Re: Custom Indicators Development

I am about to attempt to modify a couple indicators.
Is this documentation the current version?

Thanks