forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Help and Support → Custom Indicators

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 14

1 (edited by SurfingWave 2024-07-16 22:20:11)

Topic: Custom Indicators

Watched the Custom Indicator Video tutorials and able to create my own custom indicators.

I successfully created custom indicators CS file using visual studio and works flawless in FSB Pro. The only issues im having trouble. During Save Expert Advisor received a prompt : Cannot find the following indicator. According to my understanding custom indicators can be created via c#(cs). That part of the video confusing to me. cs should be converted to mqh? I though FSB Pro automatically convert the cs to mqh? Step by step guide will be nice.  Thanks

Re: Custom Indicators

Finally, figured it out convert cs to mqh custom folder after that able to export the EA and new problem arrives. I can't run the EA in MT4? any ideas? run flawless in FSB Pro but can't run it mt4 did I miss something?

Re: Custom Indicators

Check the error messages.

And it is not just about moving files between folders, .mqh version must be in mql, not in C#.

Re: Custom Indicators

footon wrote:

Check the error messages.

And it is not just about moving files between folders, .mqh version must be in mql, not in C#.

Thanks! Got it compile without error on Mt4 only issues

Journal message from mt4:
teting kakd EURUSD,H1: array out of range in 'teting kakd.mq4' (2852,35)
  teting kakd EURUSD,H1: Loading data: EURUSD,H1, Minimum bars: 27...

Any suggestions. Thank you very much!

Re: Custom Indicators

Footon just wondering FSB PRO has it own indicator structures? Possible to get a sample for c# and mqh.

Re: Custom Indicators

Open your EA and look up line 2852, that line is giving you array out of range error. It might be directly erroneous there or the error can be somewhere earlier, which results as a conflict in line 2852. Depends how have you coded it.

For FSB C# indis you go the repository in github, link to the post, which contains the link, below smile

https://forexsb.com/forum/post/19842/#p19842

It offers everything you need to know.

For corresponding samples of .mqh versions - Forex Strategy Builder Pro\User Files\MT4 Files\MQL\Forexsb.com\Indicators

---

I'm assuming now that you made light and quite simple modifications to one of FSB's standard indis. So, you need to take the respective .mqh file as a base version and make the same modifications there. Usually it's just a copy-paste job but it depends on complexity of your added changes.

If you don't consider it top secret, you can post the code lines you are having trouble with, and it will be a bit easier to help, guide and teach you.

7 (edited by SurfingWave 2024-07-18 18:20:59)

Re: Custom Indicators

footon wrote:

Open your EA and look up line 2852, that line is giving you array out of range error. It might be directly erroneous there or the error can be somewhere earlier, which results as a conflict in line 2852. Depends how have you coded it.

For FSB C# indis you go the repository in github, link to the post, which contains the link, below smile

https://forexsb.com/forum/post/19842/#p19842

It offers everything you need to know.

For corresponding samples of .mqh versions - Forex Strategy Builder Pro\User Files\MT4 Files\MQL\Forexsb.com\Indicators

---
I'm assuming now that you made light and quite simple modifications to one of FSB's standard indis. So, you need to take the respective .mqh file as a base version and make the same modifications there. Usually it's just a copy-paste job but it depends on complexity of your added changes.

If you don't consider it top secret, you can post the code lines you are having trouble with, and it will be a bit easier to help, guide and teach you.

i have some sample. I believe screw up in mgh. My cs file im using AI assist making it and pass FSB PRO checker. only failed if I run it to mt4. maybe the problem from conversion mqh to mql4?

Post's attachments

SMACROSS.cs 5.81 kb, 1 downloads since 2024-07-18 

SMACROSS.mqh 2.21 kb, 1 downloads since 2024-07-18 

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

Re: Custom Indicators

Firstly I don't see the point of this indicator when FSB already has such an indicator - it is called Moving Averages Crossover.

If you want a strip-down version of it, and that is how your sample looks like, then it is much more reasonable approach to use that standard indi and strip it down to your liking!

Secondly, my advice is to first learn the concept of FSB indicators and how they are supposed to work (ton of info in the forum, in the user manual and the source code of indis provide more than enough examples to figure it out), and only after that you can use different AI bots to assist you in indicator coding as the most critical flaw I see in your indicator is the absence of previous bar usage. The backtest results you see in FSB are not realistic because your indicator looks into the future! In live trading it will not be able to look into the future and the expected behaviour and returns will be diametrically opposed.

Thirdly, your .mqh is not what is needed. Open MovingAveragesCrossover.mqh from the folder path I gave you in my last post and study it.

Re: Custom Indicators

footon wrote:

Firstly I don't see the point of this indicator when FSB already has such an indicator - it is called Moving Averages Crossover.

If you want a strip-down version of it, and that is how your sample looks like, then it is much more reasonable approach to use that standard indi and strip it down to your liking!

Secondly, my advice is to first learn the concept of FSB indicators and how they are supposed to work (ton of info in the forum, in the user manual and the source code of indis provide more than enough examples to figure it out), and only after that you can use different AI bots to assist you in indicator coding as the most critical flaw I see in your indicator is the absence of previous bar usage. The backtest results you see in FSB are not realistic because your indicator looks into the future! In live trading it will not be able to look into the future and the expected behaviour and returns will be diametrically opposed.

Thirdly, your .mqh is not what is needed. Open MovingAveragesCrossover.mqh from the folder path I gave you in my last post and study it.

Thank for advice!

Probably will took me years to learn to code if I do it in old ways but I see your point. I successfully,  created custom after custom indicators base on my style of trading.

10 (edited by SurfingWave 2024-07-31 04:50:47)

Re: Custom Indicators

Facing another issues: Cannot find the indicator? I usually, edit cs in notepad +++ and the issue gone. but now still persist. C# pass no errors. attached the indicator below

Re: Custom Indicators

Cannot find while exporting? It needs to be in .mqh, not in .cs.

Re: Custom Indicators

footon wrote:

Cannot find while exporting? It needs to be in .mqh, not in .cs.

Thanks! "Its says cannot find the following indicator"  Check library the indicator dll is present.

13 (edited by SurfingWave 2024-07-31 04:51:11)

Re: Custom Indicators

footon wrote:

Cannot find while exporting? It needs to be in .mqh, not in .cs.

Can't find a solutions on  error message: StartIndex cannot be less than zero. Can help me figure it out. mqh file attached. Thanks!

Re: Custom Indicators

Like I said before - indicators, whether they are .cs or .mqh files for exporting, need to follow strict FSB standard. If you let some ai bots to code indicators, then they might be correct from a coding language point of view, but they are not compatible with the program, and they will never, ever load up. Moreover, if indicators do not follow the concept of how indicators are supposed to be used in the program, it will introduce a whole raft of other problems, effectively rendering those indicators useless and, what's more relevant, dangerous as their performance will have nothing to do with stats they produce in backtest. So why waste time and effort and fool yourself with randomly working indis?

Regarding your last attachment - it is purely mt indicator, it has nothing to do with FSB, there's nothing to figure out.

Posts: 14

Pages 1

You must login or register to post a reply

Forex Software → Help and Support → Custom Indicators

Similar topics in this forum