답변완료
감사합니다
nput : Period(10),multiple(3),MA_period(125);
var : base(0),ATRv(0),lower_band(0),upper_band(0),uptrend(0),downtrend(0);
base=(H+L)/2;
ATRv = ATR(Period);
lower_band=base-ATRv*multiple;
upper_band=base+atr(period)*multiple;
if highest(lower_band, period)[1] < lower_band Then
uptrend = lower_band;
if lowest(upper_band, period)[1] > upper_band Then
downtrend = upper_band;
var1 = Ema(c,ma_Period);
if var1 < C and C > uptrend Then
PlotPaintBar(H,L,"강조",Magenta);
if var1 > C and C < downtrend Then
PlotPaintBar(H,L,"강조",Cyan);
######첨부파일사진처럼 차트위에 부탁드립니다
2022-10-04
886
글번호 162722
지표
답변완료
수정부탁드립니다
현재 ema 기준 인경우 수직선표시 ema 설정시점 이탈시 기존수직 표시선 삭제 부탁드립니다.
Input:af(0.02),maxAF(0.25),ssk(60);
Var:오늘(0),극대(0),극저(0),가속(0),내일(0),hd(0),hkl(1),hdl(-1),tl(0);
Var1 = Ema(C,ssk);
if Var1 > 0 and
극대 == 0 and 극저 == 0 then {
극대 = Var1; 극저 = Var1;
}
if Var1 > 0 and
오늘[1] == 0 then {
if hd[1] == 0 then {
if Var1[1] < Var1 then hd = hkl;
if Var1[1] > Var1 then hd = hdl;
}
if hd[1] == hkl and Var1[1] > Var1 then {
hd = hdl;
오늘 = 극대[1];
가속 = af;
}
if hd[1] == hdl and Var1[1] < Var1 then {
hd = hkl;
오늘 = 극저[1];
가속 = af;
}
극저 = min(Var1,극저);
극대 = max(Var1,극대);
}
//Text_New(sdate,stime,극대,"↑");
//Text_New(sdate,stime,극저,"↓");
if 오늘[1] > 0 then {
if hd[1] == hkl then {
if Var1 > 내일[1] then {
오늘 = 내일[1];
극저 = 0;
if Var1 > 극대[1] then {
극대 = Var1;
가속 = min(maxAF,가속+af);
}
}
else {
hd = hdl;
오늘 = 극대[1];
극대 = 0;
극저 = Var1;
가속 = af;
}
}
if hd[1] == hdl then {
if Var1 < 내일[1] then {
오늘 = 내일[1];
극대 = 0;
if Var1 < 극저[1] then {
극저 = Var1;
가속 = min(maxAF,가속+af);
}
}
else {
hd = hkl;
오늘 = 극저[1];
극저 = 0;
극대 = Var1;
가속 = af;
}
}
}
내일 = (max(극대,극저) - 오늘) * 가속 + 오늘;
if var1 > C Then
{
Plot1(var1, "오늘",BLUE);
tl = TL_New(sdate,stime,9999999,sdate,stime,0);
TL_SetColor(tl,Blue);
}
Else
{
Plot1(var1, "오늘",RED);
tl = TL_New(sdate,stime,9999999,sdate,stime,0);
TL_SetColor(tl,Red);
}
2022-10-04
940
글번호 162721
지표
답변완료
문의 드립니다.
input : 익절틱수(160),손절틱수(100);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("ss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("ss1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("sss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("sss1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b8",AtStop,NextBarOpen+PriceScale*10);
Sell("s8",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("bb",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("bb1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b9",AtStop,NextBarOpen+PriceScale*10);
Sell("s9",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("bbb",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("bbb1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
-------------
늘 감사합니다.
체결내역을 보시면
1번 매수
2번 매수청산
3번 스위칭으로 매도
4번 매도청산
이렇게 이해하고있습니다.
5번 스위칭으로 매수 신호가 없는데 위 수식어에서 가능 유무를 문의 드립니다.
2022-10-04
914
글번호 162718
시스템
답변완료
수식 검토 부탁 드립니다
안녕하세요!
아래 만들어 주신 수식을 적용해 보니 표현이 안된 부분이 있어서 검토 부탁드립니다.
전 두 상품간의 가격의 차이를 실시간으로 가격값이 표시되어 나타나기를 원합니다.
그런데 가격 값이 수치로 나타나질 않습니다.
첨부 파일에 보면 파란색 박스안에 숫자(가격의 격차)처럼 나타내 주시길 부탁 드립니다.
var : ii(0,Data1),mm(0,Data1),tl1(0,Data1),tl2(0,Data1);
mm = (Data1(c)+data2(c))/2;
if CurrentDate == sDate Then
{
if Data1(sDate != sDate[1])Then
{
tl1 = TL_New(sDate,stime,Data1(c),NextBarSdate,NextBarStime,Data1(c));
TL_SetExtLeft(tl1,true);
TL_SetExtRight(tl1,true);
TL_SetColor(tl1,Lime);
tl2 = TL_New(sDate,stime,Data2(c),NextBarSdate,NextBarStime,Data2(c));
TL_SetExtLeft(tl2,true);
TL_SetExtRight(tl2,true);
TL_SetColor(tl2,Magenta);
}
Else
{
TL_SetBegin(tl1,sDate,sTime,Data1(c));
TL_SetEnd(tl1,NextBarSdate,NextBarStime,Data1(c));
TL_SetBegin(tl2,sDate,sTime,Data2(c));
TL_SetEnd(tl2,NextBarSdate,NextBarStime,Data2(c));
}
}
----------------------------------------------------------------------------
아래 피보나치의 수치 비율의 글자 색상 변경과 위치를 왼쪽, 오른쪽, 중간으로 설정할 수 있게 외부변수로 바꾸어 주시길 부탁드립니다.
매매시에 다른 색이 들어간 수식과 자주 겹쳐져 불편할 때가 있습니다.
input : Per1(23.6),Per2(38.2),Per3(50.0),Per4(61.8),Per5(76.4);
var : HH(0),LL(0),tx1(0),tx2(0),tx3(0),tx4(0),tx5(0),tx6(0),tx7(0);
HH = dayhigh;
LL = daylow;
if HH > 0 and LL > 0 then{
var1 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per1/100));
var2 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per2/100));
var3 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per3/100));
var4 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per4/100));
var5 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per5/100));
plot1(HH,"최고",Gray);
plot2(LL,"최저",Gray);
plot3(var1,"Per1%",Gray);
plot4(var2,"Per2%",Gray);
plot5(var3,"Per3%",Gray);
plot6(var4,"Per4%",Gray);
plot7(var5,"Per5%",Gray);
Text_Delete(tx1);
Text_Delete(tx2);
Text_Delete(tx3);
Text_Delete(tx4);
Text_Delete(tx5);
Text_Delete(tx6);
Text_Delete(tx7);
tx1 = Text_New(sdate,stime,HH,"고");
tx2 = Text_New(sdate,stime,LL,"저");
tx3 = Text_New(sdate,stime,var1,NumToStr(Per1,1)+"%");
tx4 = Text_New(sdate,stime,var2,NumToStr(Per2,1)+"%");
tx5 = Text_New(sdate,stime,var3,NumToStr(Per3,1)+"%");
tx6 = Text_New(sdate,stime,var4,NumToStr(Per4,1)+"%");
tx7 = Text_New(sdate,stime,var5,NumToStr(Per5,1)+"%");
}
2022-10-04
986
글번호 162707
지표