Current location - Trademark Inquiry Complete Network - Futures platform - How does Tongda's stock software show which board it is?
How does Tongda's stock software show which board it is?
How does Tongda's stock software show which board it is?

There will be a sign on it, 1/2/3, which stands for daily limit. How to set up a communication letter?

The compilation of this indicator is divided into two parts. One is to judge which board is trading today; The second is displayed on the software (main picture).

Write an indicator first to judge which board is trading today.

Here we will use a function called BARSLASTCOUNT(X) to calculate the number of cycles that meet the conditions continuously.

The condition for continuous satisfaction is the daily limit, that is, C/REF(C, 1)> 1.096).

Together, it is written like this.

DJB:=BARSLASTCOUNT(C/REF(C, 1)> 1.096);

In the second part, we need to display numbers on the first board. We need to use this function called DRAWNUMBER(COND, price, number) to extract the number.

DRAWNUMBER(C/REF(C, 1)> 1.096, H* 1.0 15, DJB), with green color;

When the daily limit is at the position of the highest price H* 1.0 15 (mainly the display is complete, if you don't multiply this 1.0 15, half of the numbers will be hidden in the Dayang line), the daily limit number will be displayed (only one number, because the result obtained by DJB is an integer).

Writing here has been completed, but in order to show better results, it is better to gild the lily. No, no, no, the pursuit of Excellence.

We do fixed-point output of words and numbers. Two functions DRAWTEXT_FIX and DRAWNUMBER_FIX are used.

The usage of these two functions is familiar,

DrawTEXT _ fix (COND, x, y, type, TEXT), when COND condition is met, the text is written at the (x, y) position in the current indicator window, where x and y are the percentage of the writing point relative to the upper left corner of the window, TYPE:0 is left-aligned, and 1 is right-aligned.

Draw number _ fix (COND, x, y, type, number), when COND condition is met, write the number # in the (x, y) position of the current indicator window, where x and y are the percentage of the writing point relative to the upper left corner of the window, TYPE:0 is left-aligned, and 1 is right-aligned.

Drawtext _ fix (currbarscout =1and C/REF(C, 1)> 1.096, 0.8, 0.2, 0,' continuous first board'), COLORYELLOW.

Draw number _ fix (currbarscout =1and C/REF(C, 1)> 1.096, 0.824, 0.2, 0, DJB), COLORGREEN.

The green color behind is used to set the display color. 0.824, 0.2, these values are adjusted according to the display on the screen.

Ok, together, our indicators are written, a new header is added in front of them, and then all the contents are copied and pasted on the indicators in the last row of the main picture.

DJB:=BARSLASTCOUNT(C/REF(C, 1)> 1.096);

DRAWNUMBER(C/REF(C, 1)> 1.096, H* 1.0 15, DJB), with green color;

Drawtext _ fix (currbarscout =1and C/REF(C, 1)> 1.096, 0.8, 0.2, 0,' continuous first board'), COLORYELLOW.

Draw number _ fix (currbarscout =1and C/REF(C, 1)> 1.096, 0.824, 0.2, 0, DJB), COLORGREEN.

See the effect.

Shows which board is continuous.

How about after work? Did you learn today's content?