커뮤니티
문의드립니다
2017-05-25 12:47:07
124
글번호 109836
안녕하세요.
특정 진입명에 진입하여 성공(익절청산)하면 당일엔 같은 진입명으로는 다시 진입하지 않게 하는 방법이 궁금합니다.
항상 감사합니다
답변 1
예스스탁 예스스탁 답변
2017-05-25 16:11:13
안녕하세요
예스스탁입니다.
아래 수식 구조 참고하시기 바랍니다.
var : BuyEntry1(false),BuyEntry2(false);
var : SellEntry1(false),SellEntry2(false);
if bdate != Bdate[1] Then{
BuyEntry1 = true;
BuyEntry2 = true;
SellEntry1 = true;
SellEntry2 = true;
}
#목표수익(SetStopProfittarget) 청산발생
if TotalTrades > TotalTrades[1] and IsExitName("StopProfitTarget",1) == true then{
if IsEntryName("b1",1) == true then
BuyEntry1 = false;
if IsEntryName("b2",1) == true then
BuyEntry2 = false;
if IsEntryName("s1",1) == true then
SellEntry1 = false;
if IsEntryName("s2",1) == true then
SellEntry2 = false;
}
if BuyEntry1 == true and 매수진입조건1 Then
buy("b1");
if BuyEntry2 == true and 매수진입조건2 Then
buy("b2");
if SellEntry1 == true and 매도진입조건1 Then
sell("s1");
if SellEntry2 == true and 매도진입조건2 Then
sell("s2");
SetStopProfittarget(~~~~~);
SetStopLoss(~~~~);
즐거운 하루되세요
> 맘속의행복 님이 쓴 글입니다.
> 제목 : 문의드립니다
> 안녕하세요.
특정 진입명에 진입하여 성공(익절청산)하면 당일엔 같은 진입명으로는 다시 진입하지 않게 하는 방법이 궁금합니다.
항상 감사합니다
이전글