Opinion on Backtest results

dell

Well-Known Member
#41
Is there a way I can find the price at which the crossover actually happens?

I am generating buy/short signals on crossover of Psar and Open on 20min TF..... and candles on this TF can be big enough to make big differences....
abhi , in my opininion , u have to consider signal on closing price of a candle ,
may be result will be less , but it most pratical way ........
u cann't trade on opening price of a candle , as when price up downs on that point signal comes and vanishes again and again

i see almost 20afl's using opening price as trigger , but in long run i am not comfortable with that ......
 
#42
Hi
dell
I revised coding for you something was wrong so i had made new coding this is
new after alter

TimeFrameSet(in1Minute*15);
MA20C_15 = MA(C,20);
MA50C_15 = MA(C,50);
tbuyx= Ref(MA20C_15,-1)>Ref(MA50C_15,-1);
//tsellx=Ref(MA50C_15,-1)>Ref(MA20C_15,-1);
tshortx=Ref(MA50C_15,-1)>Ref(MA20C_15,-1);
//tcoverx=Ref(MA20C_15,-1)>Ref(MA50C_15,-1);
TimeFrameRestore();
ttbuyx=TimeFrameExpand(tbuyx,in1Minute*15);
//ttsellx=TimeFrameExpand(tsellx,in1Minute*15);
ttshortx=TimeFrameExpand(tshortx,in1Minute*15);
//ttcoverx=TimeFrameExpand(tcoverx,in1Minute*15);

MA20C = MA(C,20);
MA50C = MA(C,50);
BuyX= Ref(Cross(MA20C_15,MA50C_15),-1);
SellX=Ref(Cross(MA50C_15,MA20C_15),-1);
ShortX=Ref(Cross(MA50C_15,MA20C_15),-1);
CoverX=Ref(Cross(MA20C_15,MA50C_15),-1);

Buy= BuyX AND ttbuyx;
Sell=SellX ;
Short= ShortX AND ttshortx;
Cover=CoverX;

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);

PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-20);
PlotShapes(IIf(Sell, shapeHollowStar, shapeNone),colorPink, 0,H, Offset=-45);
PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-45);
PlotShapes(IIf(Cover, shapeHollowStar, shapeNone),colorLime, 0,L, Offset=-45);
 

dell

Well-Known Member
#43
Hi
dell
I revised coding for you something was wrong so i had made new coding this is
new after alter

TimeFrameSet(in1Minute*15);
MA20C_15 = MA(C,20);
MA50C_15 = MA(C,50);
tbuyx= Ref(MA20C_15,-1)>Ref(MA50C_15,-1);
//tsellx=Ref(MA50C_15,-1)>Ref(MA20C_15,-1);
tshortx=Ref(MA50C_15,-1)>Ref(MA20C_15,-1);
//tcoverx=Ref(MA20C_15,-1)>Ref(MA50C_15,-1);
TimeFrameRestore();
ttbuyx=TimeFrameExpand(tbuyx,in1Minute*15);
//ttsellx=TimeFrameExpand(tsellx,in1Minute*15);
ttshortx=TimeFrameExpand(tshortx,in1Minute*15);
//ttcoverx=TimeFrameExpand(tcoverx,in1Minute*15);

MA20C = MA(C,20);
MA50C = MA(C,50);
BuyX= Ref(Cross(MA20C_15,MA50C_15),-1);
SellX=Ref(Cross(MA50C_15,MA20C_15),-1);
ShortX=Ref(Cross(MA50C_15,MA20C_15),-1);
CoverX=Ref(Cross(MA20C_15,MA50C_15),-1);

Buy= BuyX AND ttbuyx;
Sell=SellX ;
Short= ShortX AND ttshortx;
Cover=CoverX;

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);

PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorGreen, 0,L, Offset=-20);
PlotShapes(IIf(Sell, shapeHollowStar, shapeNone),colorPink, 0,H, Offset=-45);
PlotShapes(IIf(Short, shapeDownArrow, shapeNone),colorRed, 0,H, Offset=-45);
PlotShapes(IIf(Cover, shapeHollowStar, shapeNone),colorLime, 0,L, Offset=-45);
what is difference in both and what is difference in result ?
 
#44
Abhi
For sharing my experience, crossover condition I'm not prefer Close price. Instead I use High or low price. Therefore, in real-time mode the signal can action without complete bar.
 
#46
dell and abhi
Do you mind sharing your complete afl may be i can help you both for your market and my market
I am also developing my strategies for autotrading for my market You both can email me will appreciate and your full strategy like your backtest just will try to see how to make the Drawdown down and not to reduce the profit much
may be we can help eachother as i am good in coding
Now
 

labdhi

Active Member
#50
I personally do not mind. I would upload it here after cleaning the excess code in a day or two as I get enough time.
u will not share , i bet on that , as u all are same person (u and dell and looser89),
u say u will share in 1-2 day , let see when this 1-2 days will come :lol::lol:
if u want to share than just copy paste it , it hardly takes 20 sec , what is problem in it .......
wheras in ur other thread u say , i want to post but how i post ....(looser89 wala)..
yeh ho kya raha hay bhai , copy paste karna bhi bhul gayay kya ?