Opinion on Backtest results

dell

Well-Known Member
#31
*** REPLY -> All four Conditions you want to decision On TimeFrame 15Min Have to Calculate On that 15Min timeframe; then, use TimeFrameExpand in Other timeframe.
Currently mistake is this Code use the result in general timeframe AND pass the result to 15Min timeframe instead.
U mean to expand each condition seperately instead of using result?
Have dozens of idea but due to illetrate in afl coding these ideas are not get implemented....
 
Last edited:
#32
The result of each timeframe is calculated by that timeframe. Even though, they can be utilized by other timeframe (that result is still by the calculation timeframe)
Therefore, the calculation timeframe is very important.

Can you send me the afl i will check the full code and what i can fix for you by email:[email protected]
I will send you back for your testing for your market
 

dell

Well-Known Member
#33
The result of each timeframe is calculated by that timeframe. Even though, they can be utilized by other timeframe (that result is still by the calculation timeframe)
Therefore, the calculation timeframe is very important.

Can you send me the afl i will check the full code and what i can fix for you by email:[email protected]
I will send you back for your testing for your market
here two scenario :

first scenario :
i have a trading system on 15m and other for 3 min :
we have to add both one ; so if both system says buy than our buy signal cames and viceversa.....
but we cover them only with signal of 3m tf ..........

so here we can add:
buy = condition's of tf3m AND conditions of tf 15m (these conditions should be compressed from 15m to 3m )
cover=condition of 3m

second scenario :

if i applied same system on 15m and 3m than :
buy=condition's of tf3m and condition's of tf 15m ( conditions are compressed but by different names as it should be differ than 3m )

here a problem arise :
in my buy condition's 7 condition's are there :
in these 7 condition's , three are taking references of higher tf say 30m ,hourly , daily.....

so my question is
1) is my way of doing correct ?
2)is already compressed 3 condition's need to be compressed again or it should be left without touching them ?
3) can a condition can be double compressed or not ? say first we compressed from hourly to 15m than again same compressed condition is again compressed from 15m to 3m ?
 
#34
First, trading Timeframe have to be specified. For your system it have to be 3Min
Second, Prepare all decision variables of each timeframe (calculating in each timeframe). For your system are 15min, hourly and etc.
Finally, expand all variables to the specified timeframe (3min) and making Buy, Sell variable by all expanded variable from other timeframe.

*** I'm not recommend to expand a variable more than one time. (should be only one time expandation)

and i need to see all details then can fix the script as you said have 7 conditions
send me in details and will finish it by tonight and send back to you but i prefer by email first
 
#35
BuyX= MA(20,C)>MA(50,C);
SellX=MA(20,C)<MA(50,C);
ShortX=MA(20,C)<MA(50,C);
CoverX=MA(20,C)>MA(50,C);

TimeFrameSet(in1Minute*15);
tbuyx= MA(20,C)>MA(50,C);
tsellx=MA(20,C)<MA(50,C);
tshortx=MA(20,C)<MA(50,C);
tcoverx=MA(20,C)>MA(50,C);
TimeFrameRestore();

ttbuyx=TimeFrameExpand(tbuyx,in1Minute*15);
ttsellx=TimeFrameExpand(tsellx,in1Minute*15);
ttshortx=TimeFrameExpand(tshortx,in1Minute*15);
ttcoverx=TimeFrameExpand(tcoverx,in1Minute*15);

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);


this is just what made for you see if works but if you really need full have to give full details so can understand the logic
 

dell

Well-Known Member
#37
Hi dell
is the coding ok as your strategy .please give me the feedback
this is not my strategy ,
here i asked pratap sir that what will be rough idea if we assume cross of 2 ema .....
as rough idea (template) will be same only we have to changed our condition's ,
ur idea is also correct ,
have not yet try my hands on this , will try at night .....if did not do that will mail u with requirments , first let me try ......
this idea of taking higher tf as reference is in my mind from 1.5 yrs , but not able to code till now , will again try and let see that this idea helps in increasing profitability or not ......
 
#40
If during backtest, the best way is run the trading system in the smallest timeframe for backtest. For trading strategy run on larger timeframe and signal price information get from the smallest timeframe.
the price information is closest to the reality.