Sounding Board and Random Brainstorming

vijkris

Learner and Follower
#81
Confused about these things.

So should I remove backtester code and simply set backtesting window as per your chart. I am backtesting only nifty.
u try using sps shares. initial margin> 5 lakhs.
ur code is not bad. in reports u can easily identify whether no of shares is taken correctly or not.
 

copypasteaee

Humbled by Markets
#85
there are many ways to do it. u can increase initial equity manually then backtest results will appear.
what i am using is for porfolio
if u want to trade only one symbol then add this in ur afl

SetPositionSize(1,spsShares);

and do this settings in symbol information.

this is better way!!
 

arsh22g

Well-Known Member
#86
I am testing a code on live market. I found a free Nifty Spot data feed online for testing purposes, I have also applied for free GDFL trial.

I observed one thing, Amibroker changes historical buy/sell signals after 10-15 minutes, without any apparent change in the conditions. Is that a problem in code or something else?
 
#87
I am testing a code on live market. I found a free Nifty Spot data feed online for testing purposes, I have also applied for free GDFL trial.

I observed one thing, Amibroker changes historical buy/sell signals after 10-15 minutes, without any apparent change in the conditions. Is that a problem in code or something else?
yes it is major problem. it is called repainting. If you backtest this system you may receive outstanding results that can not be reproduced in real trading.
 
#89
How to avoid it?

But all the signals now appear to be stable, maybe because there was no backfill for the data.
actually there are many reasons for signals repaints. the below is one of them.
take entry exit on candle close in afl and check again signals are repainting.
if signals are not repainting then the is problem is in entry exit execution coding. correct it.
 

arsh22g

Well-Known Member
#90
actually there are many reasons for signals repaints. the below is one of them.
take entry exit on candle close in afl and check again signals are repainting.
if signals are not repainting then the is problem is in entry exit execution coding. correct it.
Just had a re-look at the chart, turns out that since the scale of price and my decision criteria is different, price candles and buy/sell arrows were overlapping sometimes when price would move in the chart area. Since the candle and arrows have same color, I wasn't able to differentiate. I think signals were not repainting, it was a visual error, but need more confirmations first.

My algo generates a large number of trades (10 daily on an average), so it's essential to check re-painting errors and so will keep on monitoring closely for repaints.
 

Similar threads