답변완료
수식 수정 부탁드립니다.
ADX선이 20을 아래서 위로 돌파해서 위로 가고 있을 때는 붉은색으로,
ADX선이 40을 위에서 아래로 돌파해서 내려가고 있을 때는 검은색으로 칠하고 싶습니다.
================================================================================
input : Period(14);
var : ADXv(0,Data2), T(0,Data2);
ADXv = Data2(ADX(Period));
If Crossup(ADXv, 20) Then
T = 1;
Else
T = 0;
Plot1(ADXv,"ADXv", GRAY);
If T == True and and ADXv > 20 Then
Plot1(ADXv,"ADXv",RED);
If T == False and ADXv[0] < 40 Then
Plot1(ADXv,"ADXv",BLACK);
PlotBaseLine1(20,"20");
PlotBaseLine2(40,"40");
2020-01-10
144
글번호 135053
지표
답변완료
손절청산시 거래일 다음에 진입하는 수식 체크 부탁드리겠습니다
저번에 답변주신대로 적용해서 시뮬 돌려보내 아래 챠트와 같이 1/8일 22:01 손절청산
한후 1/9일 3시 20분에 매수진입이 되었습니다
만약에 1/8일 22:01 손절 청산시 (이익 청산시는 아님) 1/9일 07:00 이후에 조건만족시 진입될수 있도록 한번 체크부탁드림니다.
Input : RSIPeriod(14),RSI매수값(50),SimPeriod(14),심리도값(22);
Input : N1(1),초기화(7);
Input : CCI기간(2000),CCI값(400);
Input : 하락틱수(3000);
Input : 즉시익절1(110),즉시손절1(80);
Input : 분할매수횟수(2),분할매수틱수(45);
input : N(12);
var : CCIv(0),RSIv(0),Simri(0),BuySetup(false),DD(0),entry(0);
CCIv = CCI(CCI기간);
RSIV = RSI(RSIPeriod);
Simri = Simrido(SimPeriod);
if bdate != bdate[1] Then
{
Entry = 0;
Condition2 = true;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
if TotalTrades > TotalTrades[1] and IsExitName("즉시손절1",1) == true then
Condition1 = false;
Condition1 = RSIv < RSI매수값 and Simri < 심리도값;
if bdate != bdate[1] Then
{
DD = DD+1;
if var2 > 0 and DD == var2+초기화 Then
BuySetup = false;
}
if BuySetup == false and Condition1 == true and Condition1[1] == false Then
{
var1 = C;
var2 = DD;
BuySetup = true;
}
if Condition2 == true and MarketPosition == 0 and BuySetup == true Then
buy("매수",AtLimit,var1-PriceScale*하락틱수);
#추가진입
if MarketPosition == 1 and MaxEntries < 분할매수횟수 Then
buy("추가매수",atlimit,LatestEntryPrice(0)-PriceScale*분할매수틱수,1);
if MarketPosition == 1 then
{
BuySetup = false;
if countif(CrossDown(CCIv,CCI값),BarsSinceEntry) >= 1 and
CCIv < CCI값 and C < O Then
ExitLong("매수cci청산");
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*즉시익절1 and C < O Then
ExitLong("즉시익절1");
ExitLong("즉시손절1",AtStop,EntryPrice-PriceScale*즉시손절1);
}
2020-01-10
162
글번호 135052
시스템