DRAWICON(CROSS(C,VAR 1),L* 1.00,5);
DRAWICON(CROSS(VAR 1,C),H* 1.00,6);
VAR2: Ma (c, 10), the color is red;
DRAWICON(CROSS(C,VAR2),L* 1.00,5);
DRAWICON(CROSS(VAR2,C),H* 1.00,6);
I also searched the Internet for a long time before I found this code. The meaning of this code is:
1. Laugh when the closing price closes above the 5-day moving average, and cry when the closing price closes below the 5-day moving average;
2. Laugh when the closing price closes above the 10 moving average, and cry when the closing price closes below the 10 moving average;
The EMA parameter can be replaced with your favorite EMA parameter. The coding of smiling face and crying face is better than that of smiling face and crying face after EMA crossing, because there is a certain delay in EMA crossing.
But when the closing price is above the moving average and below it, we must make a comprehensive judgment according to the trend of the moving average. Otherwise, it is meaningless to see smiling faces and crying faces often during the sideways period.
Smiling faces and crying faces are like road signs, which give us a clear signal if we can understand the relationship between the moving average and the K-line more deeply!
This indicator can also be used in Master Bo Yi. Change VAR 1 to MA 1 and change VAR2 to MA2. The effect is the same. I hope it helps you.
Attachment: Index code of high and low point line drawing in the early stage
VAR5:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
VAR6:=CROSS(VAR5,0.9);
VAR7:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
VAR8:=CROSS(VAR7,0.9);
Pressure: = ref (high, barlast (var 6));
STICKLINE(C,REF(HIGH,BARSLAST(VAR6)),REF(HIGH,BARSLAST(VAR6)),0.5, 1),COLORFFFF00
Support: = ref (low,bar last(var 8));
STICKLINE(C,REF(LOW,BARSLAST(VAR8)),REF(LOW,BARSLAST(VAR8)),0.5, 1),COLOR00FF00
If the number after "VAR" has repeated definitions, it can be changed, such as changing "VAR5" to "VAR55", then all the "VAR5" should be changed to "VAR55", otherwise you will fail the exam!