커뮤니티
시스템 수식 검증
아래 수식 들을 검증 부탁 드립니다.
특히 중괄호 부분들이 잘 되어 있는지 검토 부탁드립니다.
[수식1]
input : 시작일(20260101),시작시간(090000);
input : 이평1(180),이평2(15);
input : 윌리엄스R기간값(14);
input : 손절틱수(100),목표틱수(200),트레일링스탑틱수(100);
var : mav1(0),WR(0);
if sdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
WR = WILLR(윌리엄스R기간값);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and c < mav1 and CrossDown(WR, -20) Then
Sell("s");
if MarketPosition == -1 Then
{
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*목표틱수 Then
ExitShort("str",AtStop,EntryPrice-PriceScale*트레일링스탑틱수);
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
[수식2]
input : 시작일(20260101),시작시간(090000);
input : 이평1(180),이평2(15);
input : 윌리엄스R기간값(14);
input : 손절틱수(100),목표틱수(200),트레일링스탑틱수(100);
var : mav1(0),WR(0);
if sdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
WR = WILLR(윌리엄스R기간값);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and c > mav1 and CrossUP(WR, -80) Then
Buy("b");
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*목표틱수 Then
ExitLong("btr",AtStop,EntryPrice+PriceScale*트레일링스탑틱수);
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
[수식3]
input : 시작일(20260101),시작시간(090000);
input : 이평1(30);
input : 윌리엄스R기간값(90);
input : 손절틱수(140),청산틱수(240);
var : mav1(0),WR(0);
if sdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
WR = WILLR(윌리엄스R기간값);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and CrossUP(WR, -80) Then
Buy("b");
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*청산틱수 Then
if CrossDown(C,mav1) Then
ExitLong("bx");
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
[수식4]
input : 시작일(20260101),시작시간(090000);
input : 이평1(30);
input : 윌리엄스R기간값(90);
input : 손절틱수(140),청산틱수(240);
var : mav1(0),WR(0);
if sdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
WR = WILLR(윌리엄스R기간값);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and CrossDown(WR, -20) Then
Sell("s");
}
if MarketPosition == -1 Then
{
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*청산틱수 Then
if CrossUp(C,mav1) Then
ExitShort("sx");
}
SetStopLoss(PriceScale*손절틱수,PointStop);
[수식5]
input : 시작일(20251101),시작시간(090000);
input : 이평1(30),이평2(240);
input : 손절틱수(150),청산틱수(300);
var : mav1(0),mav2(0);
if sdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
MAV2 = MA(c,이평2);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and CrossDown(c, mav1) Then
Sell("s");
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) <= EntryPrice+PriceScale*청산틱수 Then
if CrossDown(C,mav2) Then
ExitLong("sx");
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
[수식6]
input : 시작일(20251101),시작시간(090000);
input : 이평1(30),이평2(240);
input : 손절틱수(150),청산틱수(300);
var : mav1(0),mav2(0);
if sdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
MAV2 = MA(c,이평2);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and CrossUp(c, mav1) Then
Buy("b");
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*청산틱수 Then
if CrossDown(C,mav2) Then
ExitLong("bx");
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
[수식7]
input : 시작일(20260101),시작시간(090000);
input : 이평1(180),이평2(15);
input : 윌리엄스R기간값(14);
input : 손절틱수(100),목표틱수(200),트레일링스탑틱수(100);
var : mav1(0),WR(0);
if sdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
WR = WILLR(윌리엄스R기간값);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and c < mav1 and CrossDown(WR, -20) Then
Sell("s");
if MarketPosition == -1 Then
{
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*목표틱수 Then
ExitShort("str",AtStop,EntryPrice-PriceScale*트레일링스탑틱수);
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
[수식8]
input : 시작일(20260101),시작시간(090000);
input : 이평1(180),이평2(15);
input : 윌리엄스R기간값(14);
input : 손절틱수(100),목표틱수(200),트레일링스탑틱수(100);
var : mav1(0),WR(0);
if sdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
WR = WILLR(윌리엄스R기간값);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and c > mav1 and CrossUP(WR, -80) Then
Buy("b");
if MarketPosition == 1 Then
{
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*목표틱수 Then
ExitLong("btr",AtStop,EntryPrice+PriceScale*트레일링스탑틱수);
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
이상입니다.
수고하세요..
답변 1
예스스탁 예스스탁 답변
2026-01-23 13:51:18