forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Forex Forum → Developers Forum → FSB Structure and C# language

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 6

Topic: FSB Structure and C# language

Dear All i decided to read about C# to best understand the software and to know how to code

I will use a free software and its add-ins , these tools will help me to walkthrough FSB and its indicators at the same time to learn C# language

I will post  My work here which will be about indicators only

And i wish popov and all coders here to correct my posts and edit them to increase the technical contents in a proper way

Finaly i wish this step from my side will enhance all active members here to add there inputs

the free software is .NET Reflector
http://reflector.red-gate.com/download.aspx?TreatAsUpdate=1

Its Add-Ins
http://reflectoraddins.codeplex.com/

And this website contain lots of articles about how to best use that fantastic tool (.NET Reflector)
http://www.simple-talk.com/dotnet/.net-tools/

Re: FSB Structure and C# language

We will be with you

Re: FSB Structure and C# language

I've used the Indicators_Base download to find most of the info needed (enumerators, indicator logic and methods etc) to code some custom indicators. There used to be a link to Indicators_Base.zip, but I can't find it. Then use a few of the indicator source files as examples (http://forexsb.com/wiki/indicators/source/start) This used to be a zip too, I don't have the link.

Indicators look like a lot of code, but it helped me most to see the C# code in 6 parts:
- Slot types - Open (can use with Bar Opening) or OpenFilter (only with Bar Closing), and Close and CloseFilter
- Parameters - at top, with "IndParam.ListParam" and "IndParam.NumParam"
- Calculate(), with for-loop to run indicator code on each bar
- Components - get arrays from for loop to display info on side of chart, and entry/exit signals
- SetDescription() - makes a string to show on strategy overview
- ToString() - shows indicator description info on chart

In the Calculate section, usually I only need int, double, sometimes bool, and arrays of them, and a few members of the Math class -- ie even a very small amount of C# language is enough to do a lot.

One of the key parts is the Indicator Logic (eg, "the _ rises", "the _ falls", etc) in the parameters. In the Component section, usually the string is matched with an Indicator logic, which you can find in the lower half of Indicators_Base\Indicator.cs.

I've attached my copy of Indicators_Base.zip until I find and can post the link to it. I've learned C# from working with the indicators too, maybe I can help with some things and look forward to learning some new things.

Post's attachments

Indicators_Base.zip 12.11 kb, file has never been downloaded. 

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

Re: FSB Structure and C# language

1-I will start by openning the FSB exe with the reflector to see what is in it and as you see it includes all build in indicator classes including also the indicators base plus other classes used to run software functions

2- I will start with the 1st indicator in the list ( Accelerator oscillator ) to navigate inside that indicator using the reflector add-ins
a- using Disassembler to show the structure of that indicator and methods included with in it ( attached here 2 pictures one collapsed and the other expanded to show the whole details of these methods )

b- The other function will be using the analyzer ( i think it is the most important tool for beginners) because it gives all details how the indicator connected to other classes and enums inside the software and as we see we will know that indicator depends on which and also it used by which indicator

If we expand ( Depends On) it will gives us Forex Strategy Builder And mscorlib) , sure we will focus on  Forex Strategy Builder  so lets expand it and here we can see how the indicator connected to the base indicators ( CheckParm , Indicator, IndicatorComp , Enums, NumericParam and ListParam) and as in picture we see it connected with each base indicator in more than on point , and by using expand function in analyzer it answer lots of Questions about which indicator depend on what and used by what


pictures attached

Regards

Post's attachments

Pic set-1.zip 589.2 kb, 9 downloads since 2010-08-30 

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

Re: FSB Structure and C# language

Hello Krog
You are right to understand how we code indicators with FSB we have to know the base indicators very well  because all info in these indicators are the corner stones of the FSB language ( it contains the vacabulary of the software smile )  and this will help us to build the custom indicators ( paragraphs) and the C# will help us to build the structure of our new  paragraphs

NB: In my previous post i aimed to find an easy way to see what the indicators consists of and its relations with base indicators 
another thought and i donot know if u find it benefitial or not , to know any new vacabulary of any new language ( i mean here FSB language  not the whole C#)  we have to translate it to a language we know( english)  so if we translate all base indicators into a readable english explanations it will accelerate our understanding to indicators and how we build them and this what i need to acheive i comming weeks

Regards

Re: FSB Structure and C# language

All you need for developing custom indicators is the FST source code project. It is ready for compiling under Visual Studio 2008 Express Edition (Freeware). I'm going to publish next beta of FST this weekend. Also its source code will be available.

Calculate(), with for-loop to run indicator code on each bar

Calculate() is called only once - before the backtesting. The indicator's values and signals are constant during the backtest. That's why one cannot make custom trailing stop, break even or so on. The position's and account's parameters are not acceptable by the indicators. An indicator uses the base properties and methods only, which are listed in the "Indicator" file.

Posts: 6

Pages 1

You must login or register to post a reply

Forex Forum → Developers Forum → FSB Structure and C# language

Similar topics in this forum