커뮤니티

수식문의드립니다

프로필 이미지
슈퍼짱짱
2017-05-04 17:41:46
113
글번호 109336
답변완료
if MarketPosition == 0 then{ Buy("매수진입1",AtLimit,Price2); } if MarketPosition == -1 and CurrentEntries == 1 then{ Sell("매도진입2",AtLimit,LatestEntryPrice + addPrice); } if MarketPosition == -1 and CurrentEntries == 2 then{ Sell("매도진입3",AtLimit,LatestEntryPrice + addPrice); } if MarketPosition == -1 and CurrentEntries == 3 then{ Sell("매도진입4",AtLimit,LatestEntryPrice + addPrice); } if MarketPosition == -1 and CurrentEntries == 4 then{ Sell("매도진입5",AtLimit,LatestEntryPrice + addPrice); } if MarketPosition == -1 and CurrentEntries == 5 then{ Sell("매도진입6",AtLimit,LatestEntryPrice + addPrice); } 이런식으로 쓴거를 for문이나 다른걸 통해서 간단하게 바꿀수없을까요.. ExitShort("매도익절1_2",AtLimit,EntryPrice+Avg10,"매도진입1"); ExitShort("매도익절2_2",AtLimit,EntryPrice+Avg10,"매도진입2"); ExitShort("매도익절3_2",AtLimit,EntryPrice+Avg10,"매도진입3"); ExitShort("매도익절4_2",AtLimit,EntryPrice+Avg10,"매도진입4"); ExitShort("매도익절5_2",AtLimit,EntryPrice+Avg10,"매도진입5"); 이것두요 ㅠㅠ
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-05-10 11:38:12

안녕하세요 예스스탁입니다. 신호의 이름은 따로 조합이 되지 않아 for문으로 줄일수 없습니다. 나열해 작성하셔야 합니다. 즐거운 하루되세요 > 슈퍼짱짱 님이 쓴 글입니다. > 제목 : 수식문의드립니다 > if MarketPosition == 0 then{ Buy("매수진입1",AtLimit,Price2); } if MarketPosition == -1 and CurrentEntries == 1 then{ Sell("매도진입2",AtLimit,LatestEntryPrice + addPrice); } if MarketPosition == -1 and CurrentEntries == 2 then{ Sell("매도진입3",AtLimit,LatestEntryPrice + addPrice); } if MarketPosition == -1 and CurrentEntries == 3 then{ Sell("매도진입4",AtLimit,LatestEntryPrice + addPrice); } if MarketPosition == -1 and CurrentEntries == 4 then{ Sell("매도진입5",AtLimit,LatestEntryPrice + addPrice); } if MarketPosition == -1 and CurrentEntries == 5 then{ Sell("매도진입6",AtLimit,LatestEntryPrice + addPrice); } 이런식으로 쓴거를 for문이나 다른걸 통해서 간단하게 바꿀수없을까요.. ExitShort("매도익절1_2",AtLimit,EntryPrice+Avg10,"매도진입1"); ExitShort("매도익절2_2",AtLimit,EntryPrice+Avg10,"매도진입2"); ExitShort("매도익절3_2",AtLimit,EntryPrice+Avg10,"매도진입3"); ExitShort("매도익절4_2",AtLimit,EntryPrice+Avg10,"매도진입4"); ExitShort("매도익절5_2",AtLimit,EntryPrice+Avg10,"매도진입5"); 이것두요 ㅠㅠ