답변완료
가속채널 상단하단 돌파이탈시 신호나 알림
input : length(100),mult(1);
var : src(0),a(0),b(0),size(0);
src = close;
size = iff((a[1]-a[2]) > 0 or (b[1]-b[2]) < 0 , atr(length) ,TrueRange);
if a[1] > a[2] Then
{
Condition1 = true;
var1 = 0;
}
Else
{
if Condition1 == true Then
var1 = var1+1;
}
if b[1] < b[2] Then
{
Condition2 = true;
var2 = 0;
}
Else
{
if Condition2 == true Then
var2 = var2+1;
}
a = max(src,a[1]) - size/pow(length,2)*(var1*mult);
b = min(src,b[1]) + size/pow(length,2)*(Var2*mult);
plot1(a);
plot2(b);
-----------------------------------------------------------
위 수식을 가지고 신호가 나오게끔 만들수 있나요?
알림소리라든지요?
제가 신호나 알림이 나왔으면 하는 위치는 위 가속채널을 캔들이 돌파나 이탈하게되면 신호나
알림이 나오게끔 해서 파악을 하고싶은데
조건을 어떻게 말하기가 어렵네요.
주가가 가속채널 상단을 고점돌파하면 나오게끔
주가가 가속채널 하단을 저점이탈하면 나오게끔
이리 설명하면 만들수 있을지요?
좀 부탁드립니다.
2020-09-17
936
글번호 142476
지표
답변완료
특정시간 강제 청산
안녕하세요 관리자님
우선 늘 감사 드립니다.
문의 드릴것이 해외선물 포지션이 남아있으면
특정시간에 강제 청산 하는 로직을 어떻게 해야되는지 문의 드립니다.
특정 시간은 오전 5시 30분 입니다.
Input : 기준선기간1(20),기준선기간2(60),지수이평기간(5);
input : LossCount(2),손절(200),트레일링스탑(100);
var:기준선1(0),기준선2(0);
var : 지수이평(0),Lcnt(0);
기준선1 = (Highest(High, 기준선기간1) + Lowest(Low, 기준선기간1)) / 2 ;
기준선2 = (Highest(High, 기준선기간2) + Lowest(Low, 기준선기간2)) / 2 ;
지수이평 = ema(C,지수이평기간);
if Bdate != Bdate[1] Then
Lcnt = 0;
if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then
Lcnt = Lcnt+1;
IF Lcnt < LossCount and (MarketPosition <= 0 OR (MarketPosition == 1 and MaxEntries < 3)) Then
{
If (기준선1[0] >= 기준선2[0]) and (Crossup(지수이평[0],기준선2[0]) or Crossup(지수이평[0],기준선1[0])) Then
Buy("b");
}
IF Lcnt < LossCount and (MarketPosition >= 0 OR (MarketPosition == -1 and MaxEntries < 3)) Then
{
If (기준선1[0] < 기준선2[0]) and (CrossDown(지수이평[0],기준선2[0]) or CrossDown(지수이평[0],기준선1[0]))Then
Sell("s");
}
if MarketPosition == 1 Then
{
ExitLong("btr",AtStop,Highest(H,BarsSinceEntry)-PriceScale*트레일링스탑);
if CrossDown(지수이평[0],기준선2[0]) or CrossDown(지수이평[0],기준선1[0]) Then
ExitLong("bx");
}
if MarketPosition == -1 Then
{
ExitShort("Str",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*트레일링스탑);
if Crossup(지수이평[0],기준선2[0]) or Crossup(지수이평[0],기준선1[0]) Then
ExitShort("sx");
}
SetStopLoss(PriceScale*손절,PointStop);
2020-09-17
802
글번호 142468
시스템
답변완료
수정 부탁드립니다.
안녕하세요?
의도한바와같이 답변 정말 감사히 잘 받았습니다.
다만, 작동을 하지않아 문의 드립니다.
원글 69224 참조.
부디 문제점 수정부탁드립니다.
감사합니다.
input : b기준선(0.05),s기준선(0.95),n(3);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
var1 = C%1;
var2 = C%1;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if entry < n Then
{
if MarketPosition == 0 and C > O and C == var1 then
Buy();
if MarketPosition == 0 and C < O and C == Var2 then
Sell();
}
input : 익절틱수(50),손절틱수(50);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2020-09-17
825
글번호 142462
시스템
답변완료
함수요청
안녕하세요?
아래 전략에 대해 스크립트 작성 요청드립니다.
감사합니다.
- 나스닥 선물 5분봉, 참조1 10분봉, 참조2 30분봉
- 매수: 5분봉, 10분봉, 30분봉 모두 볼린져 밴드 상단 돌파 완성시 익봉 시가에 진입
- 매도: 5분봉, 10분봉, 30분봉 모두 볼린져 밴드 하단 이탈 완성시 익봉 시가에 진입
- 매수청산: 5분봉상 볼린져 밴드 하단 이탈 완성 and 10분봉상 5ma 이탈 and 30분봉상 20ma 이탈된 상태가 완성시 익봉 시가에 청산
- 매도청산: 5분봉상 볼린져 밴드 하단 돌파 완성 and 10분봉상 5ma 돌파 and 30분봉상 20ma 돌파된 상태가 완성시 익봉 시가에 청산
2020-09-17
939
글번호 142457
시스템
답변완료
수식어 부탁드립니다
var : entry(0);
if bdate != bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition <= 0 and entry < 1 Then
buy("b",atlimit,dayhigh-PriceScale*60);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*80);
if MarketPosition >= 0 and entry < 1 Then
sell("s",atlimit,daylow+PriceScale*3500);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*120);
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
---------------------------------------------------
위 수식어는 하루 1매매 입니다.
하루 2매매 수식어와 3매매 수식어도 부탁드립니다.
미리 감사드립니다. 수고하세요
2020-09-17
929
글번호 142456
시스템