커뮤니티

수식 문의 드립니다

프로필 이미지
toal
2019-08-28 08:34:31
187
글번호 131531
답변완료
진입신호가 뜨면 바로 진입하지 않고 신호시작부터 누적손실 -13틱 되었을때 진입했다가 실제 진입가격에서 누적수익 14틱이 되면 청산하고 진입멈추게 하고싶습니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-08-29 09:07:24

안녕하세요 예스스탁입니다. var : BuySetup(false),SellSetup(false),Buyprice(0),SellPrice(0); if MarketPosition <= 0 and BuySetup == false and 매수조건 Then { BuySetup = true; Buyprice = C-PriceScale*13; } if MarketPosition >= 0 and BuySetup == false and 매도조건 Then { SellSetup = true; SellPrice = C+PriceScale*13; } if MarketPosition == 1 Then BuySetup = false; if MarketPosition == -1 Then SellSetup = false; if MarketPosition <= 0 and BuySetup == true Then buy("b",atlimit,BuyPrice); if MarketPosition >= 0 and SellSetup == true Then sell("s",atlimit,SellPrice); SetStopProfittarget(PriceScale*13,PointStop); 즐거운 하루되세요 > toal 님이 쓴 글입니다. > 제목 : 수식 문의 드립니다 > 진입신호가 뜨면 바로 진입하지 않고 신호시작부터 누적손실 -13틱 되었을때 진입했다가 실제 진입가격에서 누적수익 14틱이 되면 청산하고 진입멈추게 하고싶습니다