input : Period(20),dv(2);
var : BBup(0),BBmd(0),BBdn(0);
BBup = BollBandUp(Period,dv);
BBmd = ma(c,Period);
BBdn = BollBandDown(Period,dv);
if C > bbup and C < O Then
Sell();
if C < bbdn and C > O Then
Buy();
안녕하세요
위식에 추가부탁드림니다
추가식
일밀 매매1번만 진입.
일일 60틱 익절시 스톱.
답변 1
예스스탁
예스스탁 답변
2023-04-27 11:44:14
안녕하세요
예스스탁입니다.
input : Period(20),dv(2),진입횟수(1),당일수익틱수(60);
var : BBup(0),BBmd(0),BBdn(0),entry(0);
Var : N1(0),dayPl(0),당일수익(0),Xcond(false);
당일수익 = PriceScale*당일수익틱수;
if Bdate != Bdate[1] Then
{
entry = 0;
Xcond = false;
N1 = NetProfit;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] then
{
if daypl >= 당일수익 Then
Xcond = true;
if (IsExitName("dbp",1) == true or
IsExitName("dsp",1) == true) then
Xcond = true;
}
BBup = BollBandUp(Period,dv);
BBmd = ma(c,Period);
BBdn = BollBandDown(Period,dv);
if MarketPosition >= 0 and C > bbup and C < O Then
{
if entry < 진입횟수 and Xcond == False Then
Sell();
Else
exitlong();
}
if C < bbdn and C > O Then
{
if entry < 진입횟수 and Xcond == False Then
Buy();
Else
exitlong();
}
if MarketPosition == 1 then
{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
}
if MarketPosition == -1 then
{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
}
즐거운 하루되세요
> 아트정 님이 쓴 글입니다.
> 제목 : 수식추가
> input : Period(20),dv(2);
var : BBup(0),BBmd(0),BBdn(0);
BBup = BollBandUp(Period,dv);
BBmd = ma(c,Period);
BBdn = BollBandDown(Period,dv);
if C > bbup and C < O Then
Sell();
if C < bbdn and C > O Then
Buy();
안녕하세요
위식에 추가부탁드림니다
추가식
일밀 매매1번만 진입.
일일 60틱 익절시 스톱.