예스스탁
예스스탁 답변
2024-05-07 15:07:04
안녕하세요
예스스탁입니다.
1번손절과 2번손절이 어떤 내용인지 모르겠습니다.
SetStopLoss로 청산되면 더이상 진입을 하지 않게 처리해 드립니다.
input : 시작일(20230425),시작시간(090000);
input : 이평1(30),이평2(60),이평3(3600);
input : 윌리엄스R기간값(70);
input : 손절틱수(500),트레일링스탑틱수(380),목표틱수(400),청산틱수(450);
var : mav1(0),mav2(0),mav3(0),WR(0);
if Bdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
MAV2 = MA(c,이평2);
MAV3 = MA(c,이평3);
WR = WILLR(윌리엄스R기간값);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and c > mav3 and CrossUP(WR, -80) Then
Buy("b");
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*청산틱수 Then
{
if CrossDown(C,mav2) Then
ExitLong("bx");
}
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*목표틱수 Then
ExitLong("btr",AtStop,EntryPrice+PriceScale*트레일링스탑틱수);
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
즐거운 하루되세요
> 블루3 님이 쓴 글입니다.
> 제목 : 시스템식 부탁 드립니다.
> input : 시작일(20230425),시작시간(090000);
input : 이평1(30),이평2(60),이평3(3600);
input : 윌리엄스R기간값(70);
input : 손절틱수(500),트레일링스탑틱수(380),목표틱수(400),청산틱수(450);
var : mav1(0),mav2(0),mav3(0),WR(0);
if Bdate >= 시작일 and sTime >= 시작시간 Then
Condition1 = true;
MAV1 = MA(c,이평1);
MAV2 = MA(c,이평2);
MAV3 = MA(c,이평3);
WR = WILLR(윌리엄스R기간값);
if Condition1 == true Then
{
if MarketPosition == 0 and c > mav3 and CrossUP(WR, -80) Then
Buy("b");
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*청산틱수 Then
if CrossDown(C,mav2) Then
ExitLong("bx");
}
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*목표틱수 Then
ExitLong("btr",AtStop,EntryPrice+PriceScale*트레일링스탑틱수);
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
위의 수식에서 손절이 되엇을때 더이상 진입이 되지 않게 하는 것을
1번 손절과 2번손절로 구분해서 수식 추가 부탁 드립니다.