커뮤니티
산식수정
2011-04-19 11:07:56
730
글번호 37746
18094 질문의 계속입니다
작성해 주신 산식으로 계속 해봤는데 잘 않됩니다
첨부된 그림의 붉은색처럼 var1을 표현하고자 합니다
수정 부탁드립니다
var: Phase(0);
var:E(0), G(0);
E=ema(Simrido(10),10);
G=ema(Simrido(10),30);
#0단계 --> 1단계
If Phase == 0 and E>30 and G>30 and E<G then {
Phase=1;
var1=0;
}
# 1단계 --> 2단계
If Phase == 1 And E<30 and G>30 and E<G then {
Phase=2;
var1=-0.5;
}
# 2단계 중 1단계로 리턴
if Phase == 2 and E > 30 then
Phase=1;
# 2단계 --> 3단계
If Phase == 2 and E<30 and G<30 and G>0 and E<G then {
Phase=3;
var1=-2;
}
# 3단계 중 2단계로 리턴
if Phase == 3 and G>30 then
Phase=2;
# 3단계 --> 4단계
If Phase ==3 and E<30 and G<30 and G>0 and E>G then {
Phase=4;
var1=-1;
}
# 4단계 중 3단계로 리턴
if Phase == 4 and E<G then
Phase=3;
# 4단계 --> 5단계
If Phase == 4 and E>30 and G<30 and E>G then {
Phase=5;
var1=-0.5;
}
# 5단계 중 4단계로 리턴
if Phase == 5 and E<30 then
Phase=4;
# 5단계 --> 6단계
If Phase == 5 and E>30 and G>30 and E>G then {
Phase=6;
var1=0;
}
# 6단계 중 5단계로 리턴
if Phase == 6 and G<30 then
Phase=5;
# 6단계중 A < B발생하면 0단계로 초기화(1단계부터 다시 조건감시를 위해 0으로 셋팅)
if Phase == 6 and E<G then
Phase=0;
Plot4(VAR1);
- 1. 20110420.jpg (0.44 MB)
답변 1
예스스탁 예스스탁 답변
2011-04-19 11:13:57
안녕하세요
예스스탁입니다.
그림만으로는 어떻게 수정해 드려야 할 지 모르겠습니다.
시간되실때 전화주시기 바랍니다.
02-3453-1060
즐거운 하루되세요
> 티끌 님이 쓴 글입니다.
> 제목 : 산식수정
> 18094 질문의 계속입니다
작성해 주신 산식으로 계속 해봤는데 잘 않됩니다
첨부된 그림의 붉은색처럼 var1을 표현하고자 합니다
수정 부탁드립니다
var: Phase(0);
var:E(0), G(0);
E=ema(Simrido(10),10);
G=ema(Simrido(10),30);
#0단계 --> 1단계
If Phase == 0 and E>30 and G>30 and E<G then {
Phase=1;
var1=0;
}
# 1단계 --> 2단계
If Phase == 1 And E<30 and G>30 and E<G then {
Phase=2;
var1=-0.5;
}
# 2단계 중 1단계로 리턴
if Phase == 2 and E > 30 then
Phase=1;
# 2단계 --> 3단계
If Phase == 2 and E<30 and G<30 and G>0 and E<G then {
Phase=3;
var1=-2;
}
# 3단계 중 2단계로 리턴
if Phase == 3 and G>30 then
Phase=2;
# 3단계 --> 4단계
If Phase ==3 and E<30 and G<30 and G>0 and E>G then {
Phase=4;
var1=-1;
}
# 4단계 중 3단계로 리턴
if Phase == 4 and E<G then
Phase=3;
# 4단계 --> 5단계
If Phase == 4 and E>30 and G<30 and E>G then {
Phase=5;
var1=-0.5;
}
# 5단계 중 4단계로 리턴
if Phase == 5 and E<30 then
Phase=4;
# 5단계 --> 6단계
If Phase == 5 and E>30 and G>30 and E>G then {
Phase=6;
var1=0;
}
# 6단계 중 5단계로 리턴
if Phase == 6 and G<30 then
Phase=5;
# 6단계중 A < B발생하면 0단계로 초기화(1단계부터 다시 조건감시를 위해 0으로 셋팅)
if Phase == 6 and E<G then
Phase=0;
Plot4(VAR1);