마켓 / MetaTrader 5 / 유틸리티 / Random Walk Chart FREE 게시됨: 17 9월 2019 현재 버전: 1.0 적합한 로봇을 찾지 못하셨나요? 프리랜스에서 나만의 로봇을 주문해 보세요 프리랜스로 이동 트레이딩 로봇 또는 지표 구매 구입 방법 EA를 작동시켜보세요 가상 호스팅으로 구매 전에 지표와 트레이딩 로봇을 테스트해보세요 마켓에서 수익 창출을 원하십니까? 제품의 판매량을 나타내는 방법 미리보기 리뷰 (1) 코멘트 (3) 제품을 구매하거나 렌트한 사용자만 코멘트를 남길 수 있습니다 MARCOS Dos santos Moreira 2020.10.26 21:29 #1 O meu meta trade 5 não está vendendo mais os meus ativos me ajudem atenciosament Ian Worthington 2022.02.08 14:08 #2 Could you show source since you made this free anyway? Ivan Zaidenberg 2022.02.22 13:30 #3 WorthyVII #: Could you show source since you made this free anyway? #property script_show_inputs #property version "1.0" #property strict //--- Parameters input string SymName = "RandomWalk"; input int HistoryDepth = 1440; input int StartFrom = 100000; input bool VolaCycle = true; double open,high,low,close; string date,time; datetime TimeLoc; int Spread=1,random; ushort f=0; //+------------------------------------------------------------------+ //| Custom iteration function | //+------------------------------------------------------------------+ int OnStart(void) { int h=FileOpen(SymName+"."+IntegerToString(HistoryDepth)+".csv",FILE_WRITE|FILE_ANSI|FILE_CSV,";"); //--- if(h==INVALID_HANDLE) { Alert("Open File Fail"); return(-1); } //--- TimeLoc=TimeLocal(); MathSrand(TimeLoc); date=TimeToString(TimeLoc-HistoryDepth*60,TIME_DATE); time=TimeToString(TimeLoc-HistoryDepth*60,TIME_MINUTES)+":00"; open=StartFrom+RandomCoin(); close=open+RandomCoin(); high=MathMax(open,close); low=MathMin(open,close); FileWrite(h,date,time,open,high,low,close,1+(high-low),0,Spread); //--- for(int i=HistoryDepth-1; i>0; i--) { date=TimeToString(TimeLoc-i*60,TIME_DATE); time=TimeToString(TimeLoc-i*60,TIME_MINUTES)+":00"; if(VolaCycle) { open=close+Vola(time)*RandomCoin(); close=open+Vola(time)*RandomCoin(); } else { open=close+RandomCoin(); close=open+RandomCoin(); } high=MathMax(open,close); low=MathMin(open,close); FileWrite(h,date,time,open,high,low,close,1+(high-low),0,Spread); } //--- FileClose(h); Alert(TerminalInfoString(TERMINAL_DATA_PATH)+"\\MQL5\\Files\\"+SymName+"."+IntegerToString(HistoryDepth)+".csv"); //--- return(0); } //+------------------------------------------------------------------+ int RandomCoin() { int limit=32767; int sequence=0; for(int i=0; i<=limit; i++) { random=MathRand()-MathRand(); if(random>=0)random=1; if(random<0)random=-1; if(sequence==0) { sequence=random; continue; } if(random>0) { if(sequence>0) { sequence=sequence+random; continue; } if(sequence<0)break; } if(random<0) { if(sequence<0) { sequence=sequence+random; continue; } if(sequence>0)break; } } return (sequence); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int Vola(string t) { int res=1; int hh=StringToInteger(StringSubstr(t,0,2)); if(hh>=0&&hh<4)res=1; if(hh>=4&&hh<8)res=2; if(hh>=8&&hh<16)res=3; if(hh>=16&&hh<20)res=2; if(hh>=20)hh=1; return res; } //+------------------------------------------------------------------+ 트레이딩 기회를 놓치고 있어요: 무료 트레이딩 앱 복사용 8,000 이상의 시그널 금융 시장 개척을 위한 경제 뉴스 등록 로그인 공백없는 라틴 문자 비밀번호가 이 이메일로 전송될 것입니다 오류 발생됨 Google으로 로그인 웹사이트 정책 및 이용약관에 동의합니다. 계정이 없으시면, 가입하십시오 MQL5.com 웹사이트에 로그인을 하기 위해 쿠키를 허용하십시오. 브라우저에서 필요한 설정을 활성화하시지 않으면, 로그인할 수 없습니다. 사용자명/비밀번호를 잊으셨습니까? Google으로 로그인
MARCOS Dos santos Moreira 2020.10.26 21:29 #1 O meu meta trade 5 não está vendendo mais os meus ativos me ajudem atenciosament
Ivan Zaidenberg 2022.02.22 13:30 #3 WorthyVII #: Could you show source since you made this free anyway? #property script_show_inputs #property version "1.0" #property strict //--- Parameters input string SymName = "RandomWalk"; input int HistoryDepth = 1440; input int StartFrom = 100000; input bool VolaCycle = true; double open,high,low,close; string date,time; datetime TimeLoc; int Spread=1,random; ushort f=0; //+------------------------------------------------------------------+ //| Custom iteration function | //+------------------------------------------------------------------+ int OnStart(void) { int h=FileOpen(SymName+"."+IntegerToString(HistoryDepth)+".csv",FILE_WRITE|FILE_ANSI|FILE_CSV,";"); //--- if(h==INVALID_HANDLE) { Alert("Open File Fail"); return(-1); } //--- TimeLoc=TimeLocal(); MathSrand(TimeLoc); date=TimeToString(TimeLoc-HistoryDepth*60,TIME_DATE); time=TimeToString(TimeLoc-HistoryDepth*60,TIME_MINUTES)+":00"; open=StartFrom+RandomCoin(); close=open+RandomCoin(); high=MathMax(open,close); low=MathMin(open,close); FileWrite(h,date,time,open,high,low,close,1+(high-low),0,Spread); //--- for(int i=HistoryDepth-1; i>0; i--) { date=TimeToString(TimeLoc-i*60,TIME_DATE); time=TimeToString(TimeLoc-i*60,TIME_MINUTES)+":00"; if(VolaCycle) { open=close+Vola(time)*RandomCoin(); close=open+Vola(time)*RandomCoin(); } else { open=close+RandomCoin(); close=open+RandomCoin(); } high=MathMax(open,close); low=MathMin(open,close); FileWrite(h,date,time,open,high,low,close,1+(high-low),0,Spread); } //--- FileClose(h); Alert(TerminalInfoString(TERMINAL_DATA_PATH)+"\\MQL5\\Files\\"+SymName+"."+IntegerToString(HistoryDepth)+".csv"); //--- return(0); } //+------------------------------------------------------------------+ int RandomCoin() { int limit=32767; int sequence=0; for(int i=0; i<=limit; i++) { random=MathRand()-MathRand(); if(random>=0)random=1; if(random<0)random=-1; if(sequence==0) { sequence=random; continue; } if(random>0) { if(sequence>0) { sequence=sequence+random; continue; } if(sequence<0)break; } if(random<0) { if(sequence<0) { sequence=sequence+random; continue; } if(sequence>0)break; } } return (sequence); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int Vola(string t) { int res=1; int hh=StringToInteger(StringSubstr(t,0,2)); if(hh>=0&&hh<4)res=1; if(hh>=4&&hh<8)res=2; if(hh>=8&&hh<16)res=3; if(hh>=16&&hh<20)res=2; if(hh>=20)hh=1; return res; } //+------------------------------------------------------------------+
Could you show source since you made this free anyway?