답변완료
시스템 수식 부탁드립니다.
옵션 청산시 아래와 같이 수식을 넣었는데 청산이 안되는데
틀린부분이 어딜까요?
## 매수익절
if MarketPosition == 1 and EntryPrice<0.51 Then
SetStopProfittarget(400,PercentStop);
if MarketPosition == 1 and EntryPrice>0.5 and EntryPrice<1.01 Then
SetStopProfittarget(200,PercentStop);
if MarketPosition == 1 and EntryPrice>1 and EntryPrice<1.51 Then
SetStopProfittarget(300,PercentStop);
if MarketPosition == 1 and EntryPrice>1.5 and EntryPrice<2.01 Then
SetStopProfittarget(250,PercentStop);
if MarketPosition == 1 and EntryPrice>2 Then
SetStopProfittarget(200,PercentStop);
SetStopLoss(50,PercentStop);
if MarketPosition == 1 Then
SetStopProfittarget(530,PercentStop);
Else if MarketPosition == -1 Then
SetStopProfittarget(500,PercentStop);
SetStopEndofday(150000);
2024-02-07
663
글번호 176492
시스템
답변완료
안녕하세요
안녕하세요
도움주신 강조식입니다.
이를 이용하여
red에서 lime으로 바뀐지 2 캔들이된 종목을 검색할 수 있을까요?
감사합니다!
input : len(3),len2(3);
var : oo(0),cc(0),hh(0),ll(0);
var : haclose(0),haopen(0),hahigh(0),halow(0);
var : o2(0),c2(0),h2(0),l2(0),col(0);
oo=ema(open,len);
cc=ema(close,len);
hh=ema(high,len);
ll=ema(low,len);
haclose = (oo+hh+ll+cc)/4;
haopen = iff(IsNaN(haopen[1]) == true , (oo + cc)/2 , (haopen[1] + haclose[1]) / 2);
hahigh = max (hh, max(haopen,haclose));
halow = min (ll, min(haopen,haclose));
o2=ema(haopen, len2);
c2=ema(haclose, len2);
h2=ema(hahigh, len2);
l2=ema(halow, len2);
col=iff(o2>c2 , red , lime);
PlotPaintBar(o2, h2, l2, c2,"smoothed",col);
2024-02-07
529
글번호 176477
종목검색