COCO研究院

 找回密碼
 註冊
搜索
查看: 3311|回復: 2

請問MA 扣抵值

[複製鏈接]
發表於 12-8-18 14:27 | 顯示全部樓層 |閱讀模式
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 軟體不同

請問有 高手大大知道要如何修改嗎 ?


發表於 12-8-18 17:51 | 顯示全部樓層
TXT_New --> text_new() / text_new_s()

TXT_SetString -->text_setstring()

但其函數用法請自行到 MultiCharts 官網查尋..
 樓主| 發表於 12-8-20 07:28 | 顯示全部樓層
感謝mewmi 幫忙
獲益良多 小弟再研究
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-11-22 08:01

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 |