Crude Oil Trading

arsh22g

Well-Known Member
I saw it manually now.. it too suffers from range bound market. as such SL is not defined. after long entry price moved down quite a bit b4 turning back to up direction..
sometimes within 4,5 bars reverse signal comes.
Noob question:

How can I backtest on hourly? Minimum periodicity is daily by default :confused:

 

arsh22g

Well-Known Member
Not able to figure out how to do hourly backtesting. Posting results for daily for the combined data shared by Ankur. Looks very good. 11.3x return over 2 years :thumb:



But the position increases with increasing profit. The return will be low if position size remains constant 1. Don't know how to do that.

 

vijkris

Learner and Follower
Noob question:

How can I backtest on hourly? Minimum periodicity is daily by default :confused:

ya real noob question :lol:
click on that daily, u ll have dropdown menu with all tf listed.
rest all settings in the pic is also wrong but don worry ankur has included it in afl.
 

arsh22g

Well-Known Member
ya real noob question :lol:
click on that daily, u ll have dropdown menu with all tf listed.
rest all settings in the pic is also wrong but don worry ankur has included it in afl.
:lol:

It is not there in the dropdown. I did some tinkering, turns out you have to mention the base time interval in the Database Settings before importing the data. Only then you can see lower TFs in the Backtest Settings.

 

arsh22g

Well-Known Member
Tested more, came up with this one

Code:
maxpos = 1; // maximum number of open positions
SetOption("InitialEquity", 10000 ); // set initial equity = 100K
SetOption( "MaxOpenPositions", maxpos );
SetPositionSize( 1, spsShares ); // number of shares/contracts per trade
k = StochK( 14 , 14);
d = StochD( 14 , 14, 14);
m=MACD(12,26);
s=Signal(12,26,9);

Buy = Cover = Cross(k, d) AND Close > MA(Close,50) AND Cross(s,m);
//Sell = Close < MA(Close,20); // OR Close < (BuyPrice -29) ;
Short = Sell = Cross(d, k) AND Close > MA(Close,50) AND Cross(m,s);
// Cover = Close > MA (Close,20); // OR Close > (ShortPrice + 29);
ApplyStop(stopTypeLoss, stopModePoint, 60, True );
//ApplyStop(stopTypeTrailing, stopModePoint, 30, True, True );
 

arsh22g

Well-Known Member
This working wonders for 1hour TF on the 2 year data shared by Ankur yesterday:

Code:
a=EMA(Close,3);
b=EMA(Close,13);
C=EMA(Close,34);

Buy=Cover=Cross(b,C) AND Cross(a,b);

Sell=Short=Cross(C,b) AND Cross(b,a);
 
This working wonders for 1hour TF on the 2 year data shared by Ankur yesterday:

Code:
a=EMA(Close,3);
b=EMA(Close,13);
C=EMA(Close,34);

Buy=Cover=Cross(b,C) AND Cross(a,b);

Sell=Short=Cross(C,b) AND Cross(b,a);
Have you changed the stop settings from analysis window. because in my system it shows different results.:confused:
 

Shikamaru

What a drag!!!
Perfect supply point at yesterday close,
Made Sell with SL-M, with 4 tick stoploss
expecting 12 points win

 

arsh22g

Well-Known Member
Have you changed the stop settings from analysis window. because in my system it shows different results.:confused:
Only tinkered with the 'General' tab in Settings window.



Can you post your result? I am getting these trades:



PS: Just realised increased # of contracts in last three trades. Keeping one contract, Net profit is 5609
 
Last edited:

Similar threads