* 아래 문장 좀 구성 요청 드립니다.
* <질문1>
문장: "60틱 수익후 이후 수익이 10틱 으로 줄어 들면" 청산 로직좀 봐 주십시요.
SetStopProfittarget(PriceScale*80,PointStop) ;
SetStopLoss(PriceScale*30,PointStop);
if MarketPosition == -1 and IsEntryName("DD3") == true Then {
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*60 Then{
exitShort("DD3cut1",AtLimit,EntryPrice-PriceScale*10);} }
위문장이 아닌가요?
if MarketPosition == -1 and IsEntryName("DD3") == true Then { if L <= EntryPrice-PriceScale*60 Then Condition2 = true;
if Condition2 == true Then ExitShort("DD3CUT2",AtLimit,EntryPrice-PriceScale*10); Else Condition2 = False; }
이문장도 안되는데 수정좀 부탁 드립니다.
<질문2> 아래 두문장을 매수식으로 표현좀 부탁 드립니다.
## 원식1
if CrossDown(mav1 ,mid) Then {TX57 = Text_New_Self (sdate,stime,mid,"●");
## 원식2
if CrossUp(LRLv - PriceScale*23 , VAR87 - PriceScale*13) Then { Tx03 = Text_New(sdate,stime,MA(L,5)-1.0 ,"●");
##
if CrossDown(mav1 ,mid) 이후 첫번재 신호(CrossUp(LRLv - PriceScale*23 , VAR87 - PriceScale*13) ) 발생 하면 buy();
즉 CrossDown(mav1 ,mid) 신호가 먼저 발생 하고
다음에 신호(CrossUp(LRLv - PriceScale*23 , VAR87 - PriceScale*13) ) 발생 하면
매수 로직이 필요 합니다.
* 고맙습니다, 수고하십시요.
답변 1
예스스탁
예스스탁 답변
2022-03-15 14:25:22
안녕하세요
예스스탁입니다.
1
if MarketPosition == -1 and IsEntryName("DD3") == true Then
{
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*60 Then{
exitShort("DD3cut1",AtStop,EntryPrice-PriceScale*10);
}
신호타입을 Atlimit이 아닌 Atstop으로 지정하셔야 합니다.
2번째 문장은,신호타입외에도 {}와 else가 잘못지정되어 있습니다.
if MarketPosition == -1 and IsEntryName("DD3") == true Then
{
if L <= EntryPrice-PriceScale*60 Then
Condition2 = true;
if Condition2 == true Then
ExitShort("DD3CUT2",AtStop,EntryPrice-PriceScale*10);
}
Else
Condition2 = False;
2
var : T(0);
if CrossDown(mav1 ,mid) Then
T = -1;
if CrossUp(mav1 ,mid) Then
T = 1;
if T == -1 and CrossUp(LRLv - PriceScale*23 , VAR87 - PriceScale*13) Then
{
T = -2;
Buy();
}
즐거운 하루되세요
> 요타 님이 쓴 글입니다.
> 제목 : 문장 연결 부탁 드립니다.
> * 아래 문장 좀 구성 요청 드립니다.
* <질문1>
문장: "60틱 수익후 이후 수익이 10틱 으로 줄어 들면" 청산 로직좀 봐 주십시요.
SetStopProfittarget(PriceScale*80,PointStop) ;
SetStopLoss(PriceScale*30,PointStop);
if MarketPosition == -1 and IsEntryName("DD3") == true Then {
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*60 Then{
exitShort("DD3cut1",AtLimit,EntryPrice-PriceScale*10);} }
위문장이 아닌가요?
if MarketPosition == -1 and IsEntryName("DD3") == true Then { if L <= EntryPrice-PriceScale*60 Then Condition2 = true;
if Condition2 == true Then ExitShort("DD3CUT2",AtLimit,EntryPrice-PriceScale*10); Else Condition2 = False; }
이문장도 안되는데 수정좀 부탁 드립니다.
<질문2> 아래 두문장을 매수식으로 표현좀 부탁 드립니다.
## 원식1
if CrossDown(mav1 ,mid) Then {TX57 = Text_New_Self (sdate,stime,mid,"●");
## 원식2
if CrossUp(LRLv - PriceScale*23 , VAR87 - PriceScale*13) Then { Tx03 = Text_New(sdate,stime,MA(L,5)-1.0 ,"●");
##
if CrossDown(mav1 ,mid) 이후 첫번재 신호(CrossUp(LRLv - PriceScale*23 , VAR87 - PriceScale*13) ) 발생 하면 buy();
즉 CrossDown(mav1 ,mid) 신호가 먼저 발생 하고
다음에 신호(CrossUp(LRLv - PriceScale*23 , VAR87 - PriceScale*13) ) 발생 하면
매수 로직이 필요 합니다.
* 고맙습니다, 수고하십시요.