블로그 이미지
Flying Mr.Cheon youGom

Recent Comment»

Recent Post»

Recent Trackback»

« 2024/5 »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

 
 


# Min Heap - BTree


## Insert Value ( include resizing )

## Pop Value


개념은 이해했는데, 실제 적용 하려고 하니까 살짝 막혀서, Practice로 만들어봄

개념이해는 C로 했으나 나중에 사용하기에는 C++이 좋을듯해서 로 구현,


출처 : https://yougome.tistory.com/481



위 코드 결과 내용



'프로그래밍' 카테고리의 다른 글

Graph API ( javascript ) 비영리  (0) 2012.06.27
:

MQL Document of the SITE.

프로그래밍/MQL4 | 2013. 7. 30. 10:44 | Posted by youGom

http://docs.mql4.com/


MetaQuotes Language 4 (MQL4) is a new built-in language for programming of trading strategies. This language allows to create your own Expert Advisors that make trading management automated and are perfectly suitable for implementing of one's own trade strategies. Besides, one can use MQL4 for creation of one's own Custom Indicators, Scripts, and Libraries.

A large amount of functions necessary for analysis of the current and previously income quotes, as well as basic arithmetic and logic operations are included in MQL4 structure. There are also basic indicators built in and commands of order placement and control.

The MetaEditor 4 (text editor) that highlights different constructions of MQL4 language is used for writing the program code. It helps users to orientate themselves in the expert system text quite easily. We use MetaQuotes Language Dictionary as a Help System for MQL4 language. An abridged guide contains functions divided into categories, operations, reserved words, and other language constructions and allows finding the description of every element we use.

Programs written in MetaQuotes Language 4 have different features and purposes:

  • Expert Advisor is a mechanical trading system (MTS) linked up to a certain chart. An Advisor starts to run with every incoming tick for a given symbol. The Advisor will not be launched for a new, tick if it is processing the previous one at this moment (i.e., the Advisor has not completed its operation yet). The Advisor can both inform you about a possibility to trade and trade at an account automatically sending orders directly to the trade server. Like most trading systems, the terminal supports testing strategies on history data with displaying trading in-and-out points in the chart.
    Experts are stored in terminal_directory\experts.

  • Custom Indicator is a technical indicator written independently in addition to those already integrated into the client terminal. Like built-in indicators, they cannot trade automatically and are intended for implementing of analytical functions only.
    Custom Indicators are stored in terminal_directory\experts\indicators.

  • Script is a program intended for a single execution of some actions. Unlike Expert Advisors, Scripts are not run tickwise, but on request.
    Scripts are stored in terminal_dictionary\experts\scripts.

  • Library is a set of custom functions containing programs most frequently used. Libraries cannot start execution by itself.
    Libraries are recommended to be stored in terminal_directory\experts\libraries.

  • Included file is a source text of the most frequently used blocks of custom programs. Such files can be included into the source texts of experts, scripts, custom indicators, and libraries at the compiling stage. The use of included files is more preferable than the use of libraries because of additional burden occurring at calling library functions.
    Included files are recommended to be stored in terminal_directory\experts\include





'프로그래밍 > MQL4' 카테고리의 다른 글

MQL4와 MQL5의 차이점  (0) 2013.07.30
:

MQL4와 MQL5의 차이점

프로그래밍/MQL4 | 2013. 7. 30. 10:42 | Posted by youGom



mql4는 절차 프로그래밍에 가깝고 mql5는 객체 지향 프로그래밍에 가깝다. 
제일 먼저 중요한 주문내는 타입이 다르다. mql4는 ordersend 주문함수에 변수값을 일일히 다 넣어주었지만 mql5는 mqlrequest 객체에 속해있는 익절 손절 심볼 등과 같은 변수값을 수정하여 ordersend 주문함수에 변수값은 요청객체(mqlrequest)와 결과객체(mqlresult)만 들어간다. 즉 두 단계로 들어간다는 것, 주문이 요청과 결과 수신으로 이루어진다는 것인데 요청객체에 변수를 수정하여 요청객체에 들어있는 변수가 통째로 주문함수에 들어간다.
mql5부터는 close open과 같은 배열이 사라졌다. mql4에서는 close[1]은 하루 전 종가를 나타냈으나 이제는 배열을 따로 만들어야한다. 이를 위해 mql5부터는 copybuffer라는 함수가 주어지는데 이 함수를 이용해 종가 시가 뿐만 아니라 이동평균값과 같은 특정 가치값을 버퍼배열에 담을 수 있다.
명칭이 기억은 안나지만(;;;) 이미 프로그래밍 언어 속에서 정해진 변수(예를 들어 Point Digit) 앞에 _이 붙는다. 즉 Point는 이제 _Point라고 쓰게 된다.
mql5를 익히게 위해서는 c++를 배우는 편이 좋다. 클래스 정도까지는 모르더라도 객체에 대한 이해는 필요하다

[출처] mql4와 mql5의 차이점|작성자 제이


'프로그래밍 > MQL4' 카테고리의 다른 글

MQL Document of the SITE.  (0) 2013.07.30
:

Graph API ( javascript ) 비영리

프로그래밍 | 2012. 6. 27. 11:30 | Posted by youGom

http://www.highcharts.com/products/highstock



'프로그래밍' 카테고리의 다른 글

최소 힙 ( min Heap ) Basic. Structure. Algorithm  (0) 2019.01.21
:
모바일 화면의 사이즈및 초기설정을 위한 태그.

<meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no;" /> 

initial-scale : 초기 줌 배율 설정
maximum-scale : 최대 줌 배배 설정
minimum-scale : 최소 줌 배율 설정
user-scalable : 사용자가 확대/축소 가능여부
:

1.2.4 HTML5 Canvas Line Cap Tutorial

프로그래밍/HTML5 | 2012. 1. 9. 10:34 | Posted by youGom

http://www.html5canvastutorials.com/tutorials/html5-canvas-line-caps/

html5 canvas line에 cap을 추가 할 수 있다.
cap은 다음 셋중 하나를 선택할 수 있다; butt, round, square.

context.lineCap=[value];


아래 링크로 예제를 확인 할 수 있다.
http://www.html5canvastutorials.com/demos/tutorials/html5_canvas_line_caps/


window.onload = function(){
    var canvas = document.getElementById("myCanvas");
    var context = canvas.getContext("2d");
 
    // butt line cap (top line)
    context.beginPath();
    context.moveTo(200, canvas.height / 2 - 50);
    context.lineTo(canvas.width - 200, canvas.height / 2 - 50);
    context.lineWidth = 20;
    context.strokeStyle = "#0000ff"; // line color
    context.lineCap = "butt";
    context.stroke();
 
    // round line cap (middle line)
    context.beginPath();
    context.moveTo(200, canvas.height / 2);
    context.lineTo(canvas.width - 200, canvas.height / 2);
    context.lineWidth = 20;
    context.strokeStyle = "#0000ff"; // line color
    context.lineCap = "round";
    context.stroke();
 
    // square line cap (bottom line)
    context.beginPath();
    context.moveTo(200, canvas.height / 2 + 50);
    context.lineTo(canvas.width - 200, canvas.height / 2 + 50);
    context.lineWidth = 20;
    context.strokeStyle = "#0000ff"; // line color
    context.lineCap = "square";
    context.stroke();
};




 

:

1.2.3 HTML5 Canvas Line Color Tutorial

프로그래밍/HTML5 | 2012. 1. 9. 10:30 | Posted by youGom

http://www.html5canvastutorials.com/tutorials/html5-canvas-line-color/

html5 canvas line은 컬러를 설정할 수 있다.

context.strokeStyle=[value];

아래 창을 열어 예제를 확인 할 수 있다.
http://www.html5canvastutorials.com/demos/tutorials/html5_canvas_line_color/


window.onload = function(){
    var canvas = document.getElementById("myCanvas");
    var context = canvas.getContext("2d");
 
    context.moveTo(100, 150);
    context.lineTo(450, 50);
    context.lineWidth = 10;
    context.strokeStyle = "#ff0000"; // line color
    context.stroke();
};
:

html5 canvas 선의 굵기를 정의 할 수 있다.
context.lineWidth=[value];

아래 주소를 클릭하면 예제가 보인다.
http://www.html5canvastutorials.com/demos/tutorials/html5_canvas_line_width/

window.onload = function(){
    var canvas = document.getElementById("myCanvas");
    var context = canvas.getContext("2d");
 
    context.moveTo(100, 150);
    context.lineTo(450, 50);
    context.lineWidth = 15;
    context.stroke();
};



'프로그래밍 > HTML5' 카테고리의 다른 글

1.2.4 HTML5 Canvas Line Cap Tutorial  (0) 2012.01.09
1.2.3 HTML5 Canvas Line Color Tutorial  (0) 2012.01.09
1.2.1 HTML5 Canvas Line Tutorial  (0) 2012.01.09
1.1.1 HTML5 Canvas Element Tutorial  (0) 2012.01.09
HTML5, JS, Javascript, canvas  (0) 2012.01.09
:

1.2.1 HTML5 Canvas Line Tutorial

프로그래밍/HTML5 | 2012. 1. 9. 10:15 | Posted by youGom

http://www.html5canvastutorials.com/tutorials/html5-canvas-lines/

 moveTo(), lineTo(), strok()함수를 이용해서 선 하나 그릴 수 있다. 
 
context.moveTo(x,y);
context.lineTo(x,y);
context.stroke();

HTML5 Canvas Line Example

아래 링크에서 확인할 수 있다. ( 여기에 삽입이 잘 안됨 ㅠ )
 http://www.html5canvastutorials.com/demos/tutorials/html5_canvas_line_drawing/

indow.onload = function(){
    var canvas = document.getElementById("myCanvas");
    var context = canvas.getContext("2d");
 
    context.moveTo(100, 150);
    context.lineTo(450, 50);
    context.stroke();
};



:

1.1.1 HTML5 Canvas Element Tutorial

프로그래밍/HTML5 | 2012. 1. 9. 10:11 | Posted by youGom

http://www.html5canvastutorials.com/tutorials/html5-canvas-element/


html5에서 쓰는 canvas는 <div> <a> <table> 등과 같은 태그 엘레먼트와 같은 것이다.
페이지 로드할 때, 단한번만 호출해 주면된다. 아래 예제이다.
<canvas id="myCanvas"></canvas>


Html5 Canvas Template

<!DOCTYPE HTML>
<html>
    <head>
        <script>
 
            window.onload = function(){
                var canvas = document.getElementById("myCanvas");
                var context = canvas.getContext("2d");
 
                // do stuff here
            };
 
        </script>
    </head>
    <body>
        <canvas id="myCanvas" width="578" height="200">
        </canvas>
    </body>
</html>

DOM오브젝트로 접근한다. context는 GetContext()함수를 호출해서 2d context를 얻어낸다.
덧붙여 말하자면, 그래픽스 해본 사람은 대략 무슨 의미인지, 코드만 봐도 알것이다.
처음 본 사람이라면. context를 화면에 그려줄 메모리 공간이라고 이해하면 된다. 즉 스케치북의 도화지라고 생각하면 이해하기 쉽다. 스케치북의 도화지도 없이 허공에다 그림을 그릴 수 없다.
위 코드는 이제 그림을 그릴 준비를 마친것이다. 화면에는 아무것도 출력되지 않는다.
크기가 ( 넓이 ) 578, ( 높이 ) 200인 흰색 도화지 하나가 준비 됐을 뿐이다.

: