MA 扣抵值
HTS 語法是
IF LastBarOnChart AND (ViewCut=1) THEN begin
str1 = "|r|n"+"?"+ NumToStr(Month( Date[Len1-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len1-1] ),0)+"|r|n"+NumToStr(Len1,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len1-1],0)
value1 = TXT_New( Date[Len1-1] , Time[Len1-1], lowest(low,Len1-1), "" )
TXT_SetString( value1, str1);
str2 = "|r|n"+"?"+ NumToStr(Month( Date[Len2-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len2-1] ),0)+"|r|n"+NumToStr(Len2,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len2-1],0)
value2 = TXT_New( Date[Len2-1] , Time[Len2-1], lowest(low,Len2-1), "" )
TXT_SetString( value2, str2);
str3 = "|r|n"+"?"+ NumToStr(Month( Date[Len3-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len3-1] ),0)+"|r|n"+NumToStr(Len3,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len3-1],0)
value3 = TXT_New( Date[Len3-1] , Time[Len3-1], lowest(low,Len3-1), "" )
TXT_SetString( value3, str3);
str4 = "|r|n"+"?"+ NumToStr(Month( Date[Len4-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len4-1] ),0)+"|r|n"+NumToStr(Len4,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len4-1],0)
value4 = TXT_New( Date[Len4-1] , Time[Len4-1], lowest(low,Len4-1), "" )
TXT_SetString( value4, str4);
str5 = "|r|n"+"?"+ NumToStr(Month( Date[Len5-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len5-1] ),0)+"|r|n"+NumToStr(Len5,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len5-1],0)
value5 = TXT_New( Date[Len5-1] , Time[Len5-1], lowest(low,Len5-1), "" )
TXT_SetString( value5, str5);
end;
小弟 想 改為 MultiCharts
IF LastBarOnChart AND (ViewCut=1) THEN begin
str1 = "|r|n"+"?"+ NumToStr(Month( Date[Len1-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len1-1] ),0)+"|r|n"+NumToStr(Len1,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len1-1],0)
value1 = TXT_New( Date[Len1-1] , Time[Len1-1], lowest(low,Len1-1), "" )
TXT_SetString( value1, str1);
str2 = "|r|n"+"?"+ NumToStr(Month( Date[Len2-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len2-1] ),0)+"|r|n"+NumToStr(Len2,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len2-1],0)
value2 = TXT_New( Date[Len2-1] , Time[Len2-1], lowest(low,Len2-1), "" )
TXT_SetString( value2, str2);
str3 = "|r|n"+"?"+ NumToStr(Month( Date[Len3-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len3-1] ),0)+"|r|n"+NumToStr(Len3,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len3-1],0)
value3 = TXT_New( Date[Len3-1] , Time[Len3-1], lowest(low,Len3-1), "" )
TXT_SetString( value3, str3);
str4 = "|r|n"+"?"+ NumToStr(Month( Date[Len4-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len4-1] ),0)+"|r|n"+NumToStr(Len4,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len4-1],0)
value4 = TXT_New( Date[Len4-1] , Time[Len4-1], lowest(low,Len4-1), "" )
TXT_SetString( value4, str4);
str5 = "|r|n"+"?"+ NumToStr(Month( Date[Len5-1] ),0) +"/"+NumToStr(DayOfMonth( Date[Len5-1] ),0)+"|r|n"+NumToStr(Len5,0)+"EMA"+"|r|n"+"? "+NumToStr(Close[Len5-1],0)
value5 = TXT_New( Date[Len5-1] , Time[Len5-1], lowest(low,Len5-1), "" )
TXT_SetString( value5, str5);
end;
但其中
TXT_New
與
TXT_SetString
2函數
似乎 2 軟體不同
請問有 高手大大知道要如何修改嗎 ?
|