The Best Trading System

What do you like or dislike on this thread?

  • Like: Trading Theory, Psy Ops, Myth Busters

    Votes: 22 37.3%
  • Like: Trading Systems

    Votes: 20 33.9%
  • Like: Everything on this thread

    Votes: 32 54.2%
  • Dislike: Too much theory, not enough actionable items

    Votes: 4 6.8%
  • Dislike: Systems discussed are found as useless

    Votes: 1 1.7%
  • Dislike: Everything on this thread

    Votes: 2 3.4%

  • Total voters
    59

Tuna

Listen and act, don't ask it, it doesn't oblige
Deleted .. wrong post
 

Tuna

Listen and act, don't ask it, it doesn't oblige
Here the real deployment snapshot of the 30 mins Fool system, I discussed few weeks back.

 
Done with this and this is coming little "Too good to be True" - but only for 120 days (30mins TF).

Bro can you please check for a little longer period. I don't have this much data.

What is changed:
  • SEMA (Slow EMA) - Changed to 200
  • FEMA (Fast EMA) - Kept same - did not help tweaking
  • STOCK Exit for Shorts - There was a typo in last code , I kept 20, it is actually -20, improved the RR a lot
  • Exit Rule: The option2 for exit (both short and long) was SEMA < or > FEMA, which I forced to a crossover now






Detailed:


Most of these are tradable (considering TF is long as 30 mins) - Few are Oxymoron - showing entry exit on same candles, we can live with those.

10/19/2016 9:15:59 AM to 2/16/2017 2:45:00 PM
Total number of trades: 15
Average number of trades per month: 8
Number of profitable trades: 12
Number of losing trades: 3
Total profit: 750.2000
Total loss: -66.6500
Percent profit: 91.116%
Largest profit: 219.8000
Largest loss: -29.6000
Maximum Drawdown: 0.0000
Maximum Drawdown (Monte Carlo): 0.0000
Compound Monthly ROR: 80.2001
Standard deviation: 635.90424004
Annualized standard deviation: 1101.41845250
Downside deviation (MAR = 10%): 0.00000000
Value Added Monthly Index (VAMI): 1.00000000
Sharpe ratio (RFR = 5%): 1.07484737
Annualized Sharpe ratio (RFR = 5%): 1.86169026
Sortino ratio (MAR = 5%): 0.00000000
Annualized Sortino ratio (MAR = 5%): 0.00000000
Sterling ratio (MAR = 5%): 0.00000000
Calmar ratio: 0.00000000
Risk to reward ratio: 0.956

12/6/2016 2:45:00 PM,SHORT,8148.3500
12/6/2016 3:15:59 PM,EXIT SHORT,8138.3500


Tuna Bro,

At the bar ending 145pm the value of 10EMA was 8154, so Short SL order would have got executed below that and the SL would have been the high of 1215pm candle of 8176 which got hit 245pm candle?

Can you please clarify?


12/7/2016 9:45:00 AM,SHORT,8150.9500
12/7/2016 9:45:00 AM,EXIT SHORT,8150.9500

12/7/2016 2:15:00 PM,SHORT,8112.4000
12/7/2016 2:45:00 PM,EXIT SHORT,8094.8000


In this case also the 10EMA was at 8156 then why did u enter @ 8112?


12/8/2016 9:15:59 AM,LONG,8197.6000
12/9/2016 1:15:00 PM,EXIT LONG,8264.1000


At 915am 20EMA was below 200 EMA so what was the reason for entry?

12/13/2016 1:15:00 PM,LONG,8194.3500
12/14/2016 9:15:59 AM,EXIT LONG,8199.0500

12/14/2016 11:15:00 AM,LONG,8207.5500
12/15/2016 10:45:59 AM,EXIT LONG,8193.0500

12/19/2016 2:45:00 PM,SHORT,8104.7000
12/19/2016 3:15:59 PM,EXIT SHORT,8101.4500

12/21/2016 9:15:59 AM,SHORT,8085.6000
12/21/2016 9:15:59 AM,EXIT SHORT,8085.6000

12/21/2016 10:45:59 AM,SHORT,8088.4000
12/21/2016 10:45:59 AM,EXIT SHORT,8088.4000

12/21/2016 12:45:00 PM,SHORT,8087.0000
12/21/2016 12:45:00 PM,EXIT SHORT,8087.0000

12/21/2016 2:45:00 PM,SHORT,8057.9000
12/21/2016 2:45:00 PM,EXIT SHORT,8057.9000

12/23/2016 2:45:00 PM,SHORT,7983.0000
12/23/2016 2:45:00 PM,EXIT SHORT,7983.0000

12/26/2016 9:15:59 AM,SHORT,7895.6000
12/26/2016 9:45:00 AM,EXIT SHORT,7925.2000


12/28/2016 2:15:00 PM,SHORT,8055.7500
12/28/2016 2:15:00 PM,EXIT SHORT,8055.7500

12/29/2016 12:15:59 PM,SHORT,8050.2500
12/29/2016 12:15:59 PM,EXIT SHORT,8050.2500

1/2/2017 11:15:00 AM,LONG,8154.2000
1/3/2017 1:45:59 PM,EXIT LONG,8197.2500

1/4/2017 12:15:59 PM,LONG,8195.2500
1/6/2017 10:45:59 AM,EXIT LONG,8260.0000


1/9/2017 1:45:59 PM,LONG,8250.3500
1/12/2017 2:15:00 PM,EXIT LONG,8401.2000


1/13/2017 10:15:00 AM,LONG,8394.2500
1/16/2017 3:15:59 PM,EXIT LONG,8418.7000

1/17/2017 2:45:00 PM,LONG,8402.2500
1/18/2017 11:45:00 AM,EXIT LONG,8427.7500


1/18/2017 2:45:00 PM,LONG,8422.1500
1/27/2017 3:15:59 PM,EXIT LONG,8641.9500


1/30/2017 3:15:59 PM,LONG,8633.7000
2/3/2017 10:15:00 AM,EXIT LONG,8723.9000

2/7/2017 11:15:00 AM,LONG,8781.0000
2/9/2017 9:45:00 AM,EXIT LONG,8779.6000

2/9/2017 12:45:00 PM,LONG,8763.2000
2/10/2017 10:45:59 AM,EXIT LONG,8792.7500


2/10/2017 1:45:59 PM,LONG,8800.0500
...(Open)?

Code (Tradescript - Zerodha Pi)
Tuna Sir,

I have started to backtest this setup. But in the first few trades that you had mentioned i have found some difference on entry / exit. I have mentioned them above in red.

If you can please clarify , then i would start the testing again for a longer duration maybe a year or so.

Please help me if i have not got the concept correctly. I have read the setup more than 100 times.

Look forward to your help.

Thanks in advance,

Regards,
 

Tuna

Listen and act, don't ask it, it doesn't oblige
Bro, it was a copy paste of what the Zerodha Pi platform had shown to me as result of the backtest.

Should not be too much of deviations across the different testing platforms as the logic is too simple. So even if a signal is generated, verify visually once.

Can you publish the total of your backtest results so that we can get a hold on the mass level deviations instead of nitpicking on each trades.

I am using something else for the real trade - signals are of good quality.

Here is a snapshot of the same ->



The reason I used Pi, as the data was more than what this (the real one I am using for trading signal generation) offers.
 

Tuna

Listen and act, don't ask it, it doesn't oblige
GM Tuna sir SEMA & FEMA are not avilable in Kite.PI is not working properly to me.What is the setting for above method for Kite.Thankyou.
Hey There,
You got me wrong. Both are EMA only. I used the word FEMA (to denote Fast EMA) and SEMA (Slow EMA). :)
 
Bro, it was a copy paste of what the Zerodha Pi platform had shown to me as result of the backtest.

Should not be too much of deviations across the different testing platforms as the logic is too simple. So even if a signal is generated, verify visually once.

Can you publish the total of your backtest results so that we can get a hold on the mass level deviations instead of nitpicking on each trades.

I am using something else for the real trade - signals are of good quality.

Here is a snapshot of the same ->



The reason I used Pi, as the data was more than what this (the real one I am using for trading signal generation) offers.
Bro,

I am not nitpicking.

Just wanted to clear my doubts before i start the backtest for atleast 6 months period so that I dont have to re-invent the wheel if i have got the setup wrong. I would be doing the back test manually.

I shall summarise my understanding of the rules, once you confirm / correct if i am wrong, then i shall proceed with the backtest:

TIME FRAME : 30 MINS

LONG ENTRY:

1. 20 EMA > 200 EMA after a recent crossover (start of a new bullish trend)
You keep on waiting till price goes below 20 EMA. You will keep on placing a stop buy order on 20 EMA

SL: Typically, below Candle low if it is a big candle or on recent swing low

Exit : Stochastics 20,3,9 goes above 80 & comes below 80
I am not clear about the other exit criteria which is OR (20EMA<200EMA AND REF(20EMA,1) > REF(200EMA,1))Please clarify this

SHORT ENTRY :


Everything remains same except that the 20 EMA is replaced by 10 EMA.

Please clarify and correct me so that I can start the backtest. Also I would be testing it on Nifty Spot.

Thanks in advance,

Regards,
 

Tuna

Listen and act, don't ask it, it doesn't oblige
Revised Code for the same

Long Trigger

#DECLARATION
SET FEMA = EMA(CLOSE,20)
SET SEMA = EMA(CLOSE,200)
# Long Condition
REF(CLOSE,1)<REF(FEMA,1) AND CLOSE>FEMA AND CLOSE>SEMA

Long Exit

#DECLARATION
SET FEMA = EMA(CLOSE,20)
SET SEMA = EMA(CLOSE,200)
SET STOC = SOPK(20, 3, 9, SIMPLE)
#EXIT Condition
REF(STOC,1)>80 AND STOC<80 OR (FEMA<SEMA AND REF(FEMA,1) > REF(SEMA,1))


Short Trigger

#DECLARATION
SET FEMA = EMA(CLOSE,10)
SET SEMA = EMA(CLOSE,200)
SET STOC = SOPK(20, 3, 9, SIMPLE)
# Long Condition
REF(CLOSE,1)>REF(FEMA,1) AND CLOSE<FEMA AND CLOSE<SEMA

Short Exit

#DECLARATION
SET FEMA = EMA(CLOSE,10)
SET SEMA = EMA(CLOSE,200)
SET STOC = SOPK(20, 3, 9, SIMPLE)
#EXIT Condition
REF(STOC,1)<-20 AND STOC>-20 OR (FEMA>SEMA AND REF(FEMA,1) < REF(SEMA,1))
Bro,

I am not nitpicking.

Just wanted to clear my doubts before i start the backtest for atleast 6 months period so that I dont have to re-invent the wheel if i have got the setup wrong. I would be doing the back test manually.

I shall summarise my understanding of the rules, once you confirm / correct if i am wrong, then i shall proceed with the backtest:
....
Regards,


Here you go

Time frame: 30 mins

Stop Loss: Fixed 50 points (don't look for pivot point SL, let the wave dance as per its tune)

Profit Booking: 200 pips fix

SL to BE and Trail: When Price crosses the Buy price by 50 points.

Long Trigger: Price have to crossover 20 EMA and 20 EMA have to above 200 EMA (does not matter since when). You enter on the candle, closing above 20 EMA when the last close was below 20 EMA.


Long Exit: Stochastics enters above 80 slab and staying there and exit on the candle when Stoch falls below 80. Other exist condition (failsafe trigger), if 20 EMA moves below 200 EMA


Short Trigger:: Same as long in opposite direction, use 10 EMA instead of 20 EMA

Short Exit: Same as long, Stoch oversold level is -20. Failsafe is 10 EMA crossing 200 ema from below

SL and Tgt is same for both long and short.

Now do share your backtesting result. I am looking forward to it.
 
Last edited:

Tuna

Listen and act, don't ask it, it doesn't oblige
Dedicated to all who had read - "Trend is our Friend",
but still could not resist Contra, as they probably felt that - calling a Bottom or Top is more profitable . And that is called taking a shortcut, like this -




Sent from my iPhone using Tapatalk
 
Here you go

Time frame: 30 mins

Stop Loss: Fixed 50 points (don't look for pivot point SL, let the wave dance as per its tune)

Profit Booking: 200 pips fix

SL to BE and Trail: When Price crosses the Buy price by 50 points.

Long Trigger: Price have to crossover 20 EMA and 20 EMA have to above 200 EMA (does not matter since when). You enter on the candle, closing above 20 EMA when the last close was below 20 EMA.


Long Exit: Stochastics enters above 80 slab and staying there and exit on the candle when Stoch falls below 80. Other exist condition (failsafe trigger), if 20 EMA moves below 200 EMA


Short Trigger:: Same as long in opposite direction, use 10 EMA instead of 20 EMA

Short Exit: Same as long, Stoch oversold level is -20. Failsafe is 10 EMA crossing 200 ema from below

SL and Tgt is same for both long and short.

Now do share your backtesting result. I am looking forward to it.

Bro,

One last clarification before i start the backtest, which one of the following should i follow :

Profit Booking: 200 pips fix

Long Exit: Stochastics enters above 80 slab and staying there and exit on the candle when Stoch falls below 80. Other exist condition (failsafe trigger), if 20 EMA moves below 200 EMA


Thanks,
 

Similar threads