Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

Programming Patterns - Decorator - script for MetaTrader 5

Views:
3855
Rating:
(15)
Published:
2019.09.21 17:08
Updated:
2019.09.29 10:23
c_decorator.mq5 (6.35 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance


 • Inheritance is not always flexible.
 • Composition and delegation is sometimes a good alternative to dynamically add new behavior.
 • Decorator type matches component type.
 • Decorators change component behavior without changing the component code.
 • A component may have arbitrary number of decorators.

 • Decorators are transparent to the client, unless the client depends on a particular component.

RULE: Open classes for extension and close for changes.

      Sudoku Sudoku

      Classical Sudoku puzzle right in MetaTrader chart.

      Trading the trend Trading the trend

      Trading the trend

      Programming Patterns - Strategy Programming Patterns - Strategy

      Encapsulating a family of interchangeable algorythms which can be modified independently from the client.

      Programming Patterns - Observer Programming Patterns - Observer

      When the subject changes, it notifies and updates its observers, who know nothing about each other.