COCO研究院

 找回密碼
 註冊
搜索
查看: 3740|回復: 3

T3 price and Chart system for Amibroker

[複製鏈接]
發表於 10-6-11 16:17 | 顯示全部樓層 |閱讀模式
  1. _SECTION_BEGIN("Price");
  2. SetChartOptions(0,chartShowDates|chartShowArrows|chartLogarithmic|chartWrapTitle);
  3. //_N(Title = StrFormat("{{NAME}} +" - {{Interval}} {{Date}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
  4. _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

  5. Plot( C, "", IIf(Close > Open, colorGreen, colorRed), styleBar + styleNoLabel);
  6. _SECTION_END();
  7. function T3(price,periods) //AMA-based
  8. {
  9. s = 0.618;
  10. periods = 2/(periods+1);
  11. e1=AMA(price,periods);
  12. e2=AMA(e1,Periods);
  13. e3=AMA(e2,Periods);
  14. e4=AMA(e3,Periods);
  15. e5=AMA(e4,Periods);
  16. e6=AMA(e5,Periods);
  17. c1=-s*s*s;
  18. c2=3*s*s+3*s*s*s;
  19. c3=-6*s*s-3*s-3*s*s*s;
  20. c4=1+3*s+s*s*s+3*s*s;
  21. Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
  22. return ti3;
  23. }

  24. //Ribbon
  25. //Ribbon
  26. uptrend=PDI()>MDI()AND Signal()<MACD();
  27. downtrend=MDI()>PDI()AND Signal()>MACD();
  28. Plot( 2, "",IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );

  29. Plot(T3(C,3),"T3",colorTan,styleThick);
  30. Plot(T3(C,5),"T5",colorLime);

  31. BuyAlert = Cross (T3(C,3), T3(C,5));
  32. SellAlert = Cross (T3(C,5), T3(C,3));

  33. shape = BuyAlert * shapeHollowUpArrow + SellAlert * shapeHollowDownArrow;
  34. PlotShapes( shape, IIf( BuyAlert ,ColorRGB(210,0,210), colorPink ),0, IIf( BuyAlert , Low, High ) );

  35. GraphXSpace = 5;
  36. dist = 0.70*ATR(7);

  37. for( i = 0; i < BarCount; i++ )
  38. {
  39. if( Buyalert[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorGreen );
  40. if( Sellalert[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ]+dist[i], colorRed ); }


  41. Buy = BuyAlert;
  42. Sell = SellAlert;

  43. Filter = Buy OR Sell;
  44. Filter = Volume > 50000;

  45. AddColumn(Buy, "Buy", 1);
  46. AddColumn(Sell, "Sell", 1);
  47. AddColumn(V, "Volume", 1);
  48. AddColumn(C, "Close", 1.2);
複製代碼
2.jpg
2.jpg
 樓主| 發表於 10-6-11 16:18 | 顯示全部樓層
第2張丟錯嘞^^
發表於 10-6-11 17:00 | 顯示全部樓層
本帖最後由 金双盈 於 10-6-11 05:04 PM 編輯

看起來很清楚
跌破均線就轉空方顏色加箭頭
可以拿來嘗試修改看看
發表於 10-6-11 19:47 | 顯示全部樓層
謝謝分享有符號喔
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 24-11-22 16:42

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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