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 → Naming Convention for Custom Indicators

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 1

Topic: Naming Convention for Custom Indicators

Please use the following naming convention for creating custom indicators.

* Avoid naming conflicts. Use unique names for your indicators.
* Do not use special characters in the indicator names. The recommended characters are:
                [A-Z] [a-z] [0-9] [- _ ' space].
* The file name has to correspond to the indicator name.

Creating file name:
- Remove spaces
- Remove apostrophe character '
- Replace dash "-" with lower dash "_"
- Replace dot "." with lower dash "_"
- Change "of" to "Of"
- The file name should be equal to the class name.

Here is the code I'm using in the program:

    string className = indicatorName
                                 .Replace(" of ", "Of")
                                 .Replace("-", "_")
                                 .Replace(".", "_")
                                 .Replace(" ", "")
                                 .Replace("'", "");

Examples:

Indicator name                        Class / File name
-------------------------------------------------------------------
"Bollinger Bands"           ->  BollingerBands
"Williams' Percent Range"   ->  WilliamsPercentRange
"Day of Week"               ->  DayOfWeek

ps:
Some of the standard indicators do not follow that convention, but we should follow it for all future indicators. The program will not be able to export an EA in the other case.

Posts: 1

Pages 1

You must login or register to post a reply

Forex Forum → Developers Forum → Naming Convention for Custom Indicators

Similar topics in this forum