Expert Advisors: FAT PANEL - page 2

 
Vigor:
I will make a manual, but a short one. ...................

And a manual for adding your own functionality (indicators, log elements, states, etc.).

Ideal (but not easy) variant: to make all functional elements "easily attachable", like plugins, so that they multiply and multiply in the codebase like mushrooms ... :)

--

Cool thing you've done, Igor. Thank you! I've been playing with it all evening.

I haven't really got into the code yet, but I'm planning to do it this weekend. Very curious to understand in detail how some features are implemented.

At a quick look at the code, the impression is very pleasant.

 

Blocks are written in an elementary way! If MQL had a mechanism similar to get_declared_classes, class_exists and is_subclass_of, the whole installation of new functionality would be just an enclode/add file of a new class (a descendant of one of the base classes).

//+------------------------------------------------------------------+
class CAlgoBlockLogicOr: public CAlgoBlockLogic {
        public:
        //+------------------------------------------------------------------+ 
        void CAlgoBlockLogicOr() {              
                setLabel("name",12,20,1,"OR");//--uniq, x, y, fontsize, title                
                //--connectors
                CConnectPointer* pointer1 = new CConnectPointer();
                pointer1.connectType = ALGO_BOOL;
                pointer1.connectDirection = ALGO_DIRECTION_IN;
                pointer1.x = 0;
                pointer1.y = 0.11;
                connectPointers.Add(pointer1);
                
                CConnectPointer* pointer2 = new CConnectPointer();
                pointer2.connectType = ALGO_BOOL;
                pointer2.connectDirection = ALGO_DIRECTION_IN;
                pointer2.x = 0;
                pointer2.y = 0.89;
                connectPointers.Add(pointer2);
                
                CConnectPointer* pointer3 = new CConnectPointer();
                pointer3.connectType = ALGO_BOOL;
                pointer3.connectDirection = ALGO_DIRECTION_OUT;
                pointer3.x = 1;
                pointer3.y = 0.5;
                connectPointers.Add(pointer3);
        }
        
        bool operate(CAlgoBlockLogic* s1, CAlgoBlockLogic* s2) {
                bool S1 = s1.process();
                bool S2 = s2.process();
                if ( S2 || S1 ) {  
                        return (true);
                }
                return (false);
        }
        
        //+------------------------------------------------------------------+
};

And if you do code insertion in visual mode, the new block would add itself. Recompiling EA on the fly and picking up new "generated" includes has already been solved. This is how the update of input parameters of blocks for the tester is implemented now.

 
Hello author, do you have any possibility to post a screenshot of the assembled blocks, or a saved file that gave such a picture on the test? It would be a good manual.
 

In the description for codebase it is the same scheme of 4 blocks. Only the value 300 in the operation block is ">". The schematic file is in the archive, unzip it to the folder

C:\Documents and Settings\All Users\Application Data\MetaQuotes\Terminal\Common\.

(the path may be different, it is better to search for the fatpanel.dat file and replace it)

Files:
FATPANEL.rar  1 kb
 

While the new version is being prepared, I will show a run of the same strategy from 2005. Testing mode "every tick". Experiments with trailing stop:

The diagram shows all parameters of the strategy and its principle. No reinvestments. A version with additional blocks will be published soon.

Strategy Tester Report
MetaQuotes-Demo (Build 370)

Settings
Expert Advisor: FatPanel
Symbol: EURUSD
Period: M1 (2005.01.01 - 2010.12.17)
Input parameters:
Broker: MetaQuotes Software Corp.
Currency: USD
Initial Deposit: 10 000.00
Leverage: 1:100

Results
Bars: 2095758 Tiki: 39061924
Net profit: 468 436.28 Total profit: 1 377 840.48 Total loss: -909 404.20
Profitability: 1.52 Expectation of winning: 84.33
Recovery Factor: 16.62 Sharpe Ratio: 0.05

Balance sheet drawdown:
Absolute balance sheet drawdown: 4 393.10 Maximum balance drawdown: 5 593.40 (8.46%) Relative balance drawdown: 8.46% (5 593.40)
Funds drawdown:
Absolute drawdown on funds: 4 622.90 Maximum drawdown on funds: 6 119.20 (9.21%) Relative drawdown on funds: 9.21% (6 119.20)

Total trades: 5555 Short trades (% won): 3237 (56.32%) Long trades (% won): 2318 (60.05%)
Total trades: 268659 Profitable trades (% of all): 3215 (57.88%) Loss trades (% of all): 2340 (42.12%)

Biggest profitable trades: 8 040.10 Biggest losing trade: -7 181.70

Average profitable trade: 428.57 Average losing trade: -388.63

Maximum number of continuous wins (profit): 75 (9 306.86) Maximum number of continuous losses (loss): 24 (-13 829.70)

Maximum continuous profits (number of wins): 12 396.20 (14) Maximum continuous loss (number of losses): -13 829.70 (24)

Average continuous gain: 3 Average continuous loss: 2

 
Restriction on the number of trades will be actual, because it opens trades on each tick with the specified lot and what is good?
Документация по MQL5: Торговые функции / HistoryDealsTotal
Документация по MQL5: Торговые функции / HistoryDealsTotal
  • www.mql5.com
Торговые функции / HistoryDealsTotal - Документация по MQL5
 
In this way the volume of the position is gained. Constantly refilled portions "by feel" eventually finds a local extremum on bid. And if you limit the opening of no more than 1 position in one direction, then more favourable opening moments are missed and the strategy fails. It is not difficult to add this restriction: +3 blocks for each direction. AND and IS_BUY(or IS_SELL) + NOT
 
Vigor:
In this way the volume of the position is gained. Constantly refilled portions "by feel" eventually finds a local extremum on bid. And if you limit the opening of no more than 1 position in one direction, then more favourable opening moments are missed and the strategy fails. It is not difficult to add this restriction: +3 blocks for each direction. AND and IS_BUY(or IS_SELL) + NOT
Thanks, I understand the final volume will be unknown, it's bad....
 

Version 0.2 doesn't want to work. How do I get it to work?

 

This problem was in one of the recent builds of the terminal.

https://www.mql5.com/ru/forum/1111/page232

If the terminal is updated to the latest version (where it is fixed), you need to recompile the indicator (in the folder mql5/indicators/fatpanel/ ) and the Expert Advisor (mql5/experts/fatpanel/).