Crude Oil Trading

arsh22g

Well-Known Member
Hey guys

Can someone backtest it on Amibroker at 1 Hour TF?

Buy:
CROSSOVER (SOPK(14,14,14,SIMPLE),SOPD(14,14,14,SIMPLE))
AND
CLOSE>SMA(CLOSE,50)

Sell:
CROSSOVER (SOPD(14,14,14,SIMPLE),SOPK(14,14,14,SIMPLE))
AND
CLOSE<SMA(CLOSE,50)

I tested it in Pi. It is showing 100% hit rate in last two months (chart attached), need to test it for a longer duration.

 

vijkris

Learner and Follower
Hey guys

Can someone backtest it on Amibroker at 1 Hour TF?

Buy:
CROSSOVER (SOPK(14,14,14,SIMPLE),SOPD(14,14,14,SIMPLE))
AND
CLOSE>SMA(CLOSE,50)

Sell:
CROSSOVER (SOPD(14,14,14,SIMPLE),SOPK(14,14,14,SIMPLE))
AND
CLOSE<SMA(CLOSE,50)

I tested it in Pi. It is showing 100% hit rate in last two months (chart attached), need to test it for a longer duration.

thanks for holy grail.
BTW what is SOPK and SOPD?
 

arsh22g

Well-Known Member
thanks for holy grail.
BTW what is SOPK and SOPD?
Vijkris bhai, holy grail to long term testing ke baad hi pata chalegi :p

SOPD and SOPK are stochastic oscillators. SOPK takes price as the input, while SOPD takes SOPK as the input, formula is same for the both. This is what Pi's Tradescript has to say about it

Stochastic Oscillator
SOPK(%K Periods, %K Slowing Periods, %D Periods, MA Type)
SOPD(%K Periods, %K Slowing Periods, %D Periods, MA Type)
Overview
The Stochastic Oscillator is a popular indicator that shows where a security’s
price has closed in proportion to its closing price range over a specified period of
time.
Interpretation
The Stochastic Oscillator has two components: %K (the SOPK function) and %D
(the SOPD function). %K is most often displayed on a stock chart as a solid line
and %D is often shown as a dotted line. The most widely used method for
interpreting the Stochastic Oscillator is to buy when either component rises
above 80 or sell when either component falls below 20. Another way to interpret
the Stochastic Oscillator is to buy when %K rises above %D, and conversely, sell
when %K falls below %D.
Recommended Parameters
% K Periods: 9
% K Slowing Periods: 3
% D Periods: 9
MA Type: SIMPLE
Example
SOPK(9, 3, 9, SIMPLE) > 80 OR SOPD(9, 3, 9, SIMPLE) > 80
Evaluates to true when the Stochastic Oscillator is in oversold territory.
 

vijkris

Learner and Follower
Vijkris bhai, holy grail to long term testing ke baad hi pata chalegi :p

SOPD and SOPK are stochastic oscillators. SOPK takes price as the input, while SOPD takes SOPK as the input, formula is same for the both. This is what Pi's Tradescript has to say about it

Stochastic Oscillator
SOPK(%K Periods, %K Slowing Periods, %D Periods, MA Type)
SOPD(%K Periods, %K Slowing Periods, %D Periods, MA Type)
Overview
The Stochastic Oscillator is a popular indicator that shows where a security’s
price has closed in proportion to its closing price range over a specified period of
time.
Interpretation
The Stochastic Oscillator has two components: %K (the SOPK function) and %D
(the SOPD function). %K is most often displayed on a stock chart as a solid line
and %D is often shown as a dotted line. The most widely used method for
interpreting the Stochastic Oscillator is to buy when either component rises
above 80 or sell when either component falls below 20. Another way to interpret
the Stochastic Oscillator is to buy when %K rises above %D, and conversely, sell
when %K falls below %D.
Recommended Parameters
% K Periods: 9
% K Slowing Periods: 3
% D Periods: 9
MA Type: SIMPLE
Example
SOPK(9, 3, 9, SIMPLE) > 80 OR SOPD(9, 3, 9, SIMPLE) > 80
Evaluates to true when the Stochastic Oscillator is in oversold territory.
thanks. I m an amateur coder and it will take atleast few days. for me. hope its not urgent. BTW I saved ur posts.
 

vijkris

Learner and Follower
That's ok. I don't know much about Amibroker. Can you share MCX Crude historical data (if it's not an issue)? Maybe I can try to flirt with it.
I have started trading crude since 6months only. my data is not continuous. :(
BTW for backtesting purpose I m also searching for historical data. maybe in another forum may find it.. lets see. :thumb:
Edit: I don have issues in sharing as long as I own the rights to share. :)
 

Similar threads