안녕하세요
아래에서 매수조건1 과 매수조건1의 익절, 손절 범위를 각각 다르게 하는게
가능할까요? 여기 게시판 검색해서 이것저것 해봤는데 잘 안돼서 문의합니다
익절 손절을 진입봉 다음봉에서 적용시키는게 가능한지요?
if 매수조건1 then
setstoploss(10.pointstop);
SetStopProfittarget(10,PointStop);
if 매수조건2 then
setstoploss(20.pointstop);
SetStopProfittarget(20,PointStop);
답변 1
예스스탁
예스스탁 답변
2022-09-13 15:14:23
안녕하세요
예스스탁입니다.
조건이 아닌 진입명을 이용해서 아래와 같이 풀여서 작성하셔야 합니다.
매수조건1은 b1, 매수조건2는 b2 진입명으로 보고 작성해 드립니다.
if 매수조건1 then
buy("b1");
if 매수조건2 then
buy("b2");
if MarketPosition == 1 Then
{
if IsEntryName("b1") == true Then
{
ExitLong("bp1",AtLimit,EntryPrice+10);
ExitLong("bl1",AtStop,EntryPrice-10);
}
if IsEntryName("b2") == true Then
{
ExitLong("bp2",AtLimit,EntryPrice+20);
ExitLong("bl2",AtStop,EntryPrice-20);
}
}
즐거운 하루되세요
> 검은약 님이 쓴 글입니다.
> 제목 : 문의합니다
> 안녕하세요
아래에서 매수조건1 과 매수조건1의 익절, 손절 범위를 각각 다르게 하는게
가능할까요? 여기 게시판 검색해서 이것저것 해봤는데 잘 안돼서 문의합니다
익절 손절을 진입봉 다음봉에서 적용시키는게 가능한지요?
if 매수조건1 then
setstoploss(10.pointstop);
SetStopProfittarget(10,PointStop);
if 매수조건2 then
setstoploss(20.pointstop);
SetStopProfittarget(20,PointStop);