본문 바로가기
트레이딩/메타트레이더 코딩

MQL5. CCI (Commodity Channel Index)

by i.got.it 2021. 3. 1.

코드.

void OnTick()
{
   double my_cci = Get_CCI(_Period,14); 
   Print(my_cci);
}



double Get_CCI(ENUM_TIMEFRAMES timeframe,int ma_period)
{
   double arr_cci[]; 
   
   int CCIretv = iCCI(_Symbol,timeframe, ma_period, PRICE_TYPICAL); 
   
   ArraySetAsSeries(arr_cci, true); 
   
   CopyBuffer(CCIretv,0,0,3,arr_cci); 
   
   return NormalizeDouble(arr_cci[0],2); 
      
}

동영상.

 

 

 

 

 

연관 

 

 

Indicator : CCI. Commodity Channel Index

개요. 정의. where, Pt = (High + Low + Close)/3. Typical Price 로 칭함. SMA(Pt) : Pt의 이동평균. : Pt 의 mean absolute deviation. 즉, Pt - SMA(Pt) 의 절대값의 이동평균. 0.015 로 나누기 하는 것 : CCI..

igotit.tistory.com

 

copybuffer 상세 

 

 

Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer

//+------------------------------------------------------------------+ //|                                              TestCopyBuffer3.mq5 | //|                        Copyright 2009,

www.mql5.com

 

상위 

 

메타트레이더 5. 체계정리. 활용법/지식

MetaTrader 5 메타트레이더 5 , 메타에디터, MQL5 활용정보 체계정리. 본 글에서 주요 정리대상 정보 1. 메타트레이더 5 사용법. 2. MQL5 언어 기반 "직접 코딩"하여 메타프레이더5에서 자동매매 달성하기

igotit.tistory.com

 

 

 


첫등록 : 2019년 4월 28일 

최종수정 : 2021.03.01

 

본 글 단축주소 : https://igotit.tistory.com/2148

 


 

댓글



 

비트코인




암호화폐       외환/나스닥/골드       암호화폐/외환/나스닥/골드 암호화폐/외환/나스닥/골드   암호화폐/외환/나스닥/골드
     
현물 |선물 인버스 |선물 USDT       전략매니저(카피트레이딩)     롤오버 이자 없는 스왑프리계좌
( 스왑프리 암호화폐도 거래 가능 )    
MT4, MT5 , cTrader 모두 지원     FTMO 계좌 매매운용. MT4,MT5