This is an example of using indicators with a double buffer of color, where Arrows are used to mean 2 colors. Update 2021 10 28
Цитата Added the type of indicator signals (xColorArrow with 1 Buffer and 2 colors), for which the signal arrows have 2 different colors (DRAW_COLOR_ARROW)When using the xColorArrow signal type, you need to set the following values: SignalBuferforBUY = Buffer number for arrows (Check with the author) or by calculating this buffer number empirically. SignalBuferforSELL = Number of the color buffer for these arrows (Check with the author), usually this number follows the arrow buffer. Attention! This type supports 2 colors, where:- 0 (the first color of the arrow) is a signal to open a BUY;
- 1 (the first color of the arrow) is a signal to open SELL;
If your indicator has these colors reversed, then you can additionally use the Signal_Reverse parameter For more information, we have made an example of using such an indicator with a DRAW_COLOR_ARROW buffer!
For example, we took the PTL indicator. This indicator does not have arrow buffers separately for the BUY / SELL signal! But there is a double buffer here, which has a different color for BUY / SELL signals
In order to identify these signals, we need to configure our Expert Advisor to work with these buffers! As an example, we found that the signal buffer is 7! And the changing color of the signal buffer is buffer number 8.
Although in this case, the numbers of buffers and the numbers of Colors in the indicator cannot be determined independently. Therefore, we opened the open code of the indicator and found these buffer numbers! If you have any difficulties in finding such a number , contact the author of the indicator!
To set up the Expert Advisor, we used: Indicator name: SignalNameIndicator = PTL (2) Signal buffer for BUY and SELL SignalBuferforBUY = 7 Color buffer for BUY and SELL SignalBuferforSELL = 8
In this case, 0 color index (clrBlue) gives a BUY signal In this case, 1 color index (clrRed) gives the SELL signal
|