NexusFi: Find Your Edge


Home Menu

 





Free Trading System by Kevin Davey (3 times World Champion)


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Shaban with 5 posts (3 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 bobwest with 1 posts (0 thanks)
    4. looks_4 SMCJB with 1 posts (0 thanks)
      Best Posters
    1. looks_one murty with 2 thanks per post
    2. looks_two Tom1978 with 2 thanks per post
    3. looks_3 TraderDoc2 with 1 thanks per post
    4. looks_4 Shaban with 0.6 thanks per post
    1. trending_up 5,305 views
    2. thumb_up 8 thanks given
    3. group 7 followers
    1. forum 10 posts
    2. attach_file 0 attachments




 
Search this Thread

Free Trading System by Kevin Davey (3 times World Champion)

  #1 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129

Hi,

In a free book by Kevin Davey (3 times World Champion), there is this Trading System:
---------------------------------------------------------------------------

Input: entry6_xr(5), entry6_daysback(10);
Var: entry6_rrange(0);

entry6_rrange=high-low;

if entry6_rrange>2*stddev(entry6_rrange, entry6_xr)+average(entry6_rrange, entry6_xr) and close>close[entry6_daysback] then buy next bar at market;
if entry6_rrange>2*stddev(entry6_rrange, entry6_xr)+average(entry6_rrange, entry6_xr) and close<close[entry6_daysback] then sellshort next bar at market;
------------------------------------------------------------------------------

that I wanted to improve by adding Stop and Reverse, and in Internet I found this formula (adding in Inputs: StopRev(1100):

If MarketPosition = 1 then Sellshort at entryprice-(StopRev) Stop;

If MarketPosition = -1 then Buy at entryprice+(StopRev) Stop;


but Tradestation 8, asks to replace: entryprice with: next bar and then the formula would become so:


If MarketPosition = 1 then Sellshort at next bar-(StopRev) Stop;

If MarketPosition = -1 then Buy at next bar+(StopRev) Stop;


but still getting with: Tools / Verify / Verify succefuls, entering the Strategy, no Buy or Sellshort signal appears.

If someone can correct the Stop and Reverse formula, thank you in advance.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
GFIs1 1 DAX trade per day journal
11 thanks
HumbleTraders next chapter
11 thanks
  #3 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,168 since Jan 2013
Thanks Given: 57,437
Thanks Received: 26,276



Shaban View Post
If someone can correct the Stop and Reverse formula, thank you in advance.

I'm sure you will get some responses that will provide help.

Let me just say that, if you don't have solid programming experience, it is exceedingly dangerous to try pasting code you found on the internet into a strategy that you are going to allow to enter trades for you. Just be very cautious about your use of any code if you aren't very confident of your programming skills.

This word of caution may be unnecessary, but I did want to give it.

And good luck.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
  #4 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129

Thanking you for the advice, I wanted to specify that the Stop and Reverse, is just one of the filters I use in my tests (in this case as an alternative to the classic StopLoss);
obviously I also use other filters: overbought / oversold Indicators, AvgTrueRange (or ADX), etc...I will use the T.S. tested only when I am more than satisfied with the results obtained, not before.

Reply With Quote
Thanked by:
  #5 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129

P.S.: Wall Street collapses....

I'll tell you how to get rich.
Close the door.
Be afraid when others are greedy, be greedy when others are afraid.

(Warren Buffett)

[img]https://i.postimg.cc/C11WF1W8/Epidemie.jpg[/img] free https image hosting

Reply With Quote
Thanked by:
  #6 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,384
Thanks Received: 10,206

Above my paygrade. Maybe Kevin himself aka @kevinkdog can help you with this. Also @ABCTG is often very helpful with questions like this.

Reply With Quote
  #7 (permalink)
Tom1978
Houston Texas
 
Posts: 15 since Dec 2019
Thanks Given: 6
Thanks Received: 11

I just tried the code on ES 30 min.
For ES 30 multiplier of 2 is too big: no trades.
So I changed the multiplier to 1: now there are trades.

I corrected your stop-and-reverse formula for TS 9.5/10.


Input: stoprev(10);

Input: entry6_xr(5), entry6_daysback(10);
Var: entry6_rrange(0);

entry6_rrange=high-low;

// if entry6_rrange>2*stddev(entry6_rrange, entry6_xr)+average(entry6_rrange, entry6_xr) and close>close[entry6_daysback] then buy next bar at market;
// if entry6_rrange>2*stddev(entry6_rrange, entry6_xr)+average(entry6_rrange, entry6_xr) and close<close[entry6_daysback] then sellshort next bar at market;

if entry6_rrange>1*stddev(entry6_rrange, entry6_xr)+average(entry6_rrange, entry6_xr) and close>close[entry6_daysback] then buy next bar at market;
if entry6_rrange>1*stddev(entry6_rrange, entry6_xr)+average(entry6_rrange, entry6_xr) and close<close[entry6_daysback] then sellshort next bar at market;

//If MarketPosition = 1 then Sellshort at entryprice-(StopRev) Stop;

// If MarketPosition = -1 then Buy at entryprice+(StopRev) Stop;


If MarketPosition = 1 then Sellshort ("Reverse1") at next bar (entryprice-StopRev) Stop;

If MarketPosition = -1 then Buy ("reverse2") at next bar (entryprice+StopRev) Stop;

Reply With Quote
Thanked by:
  #8 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129


Tom1978 View Post
I corrected your stop-and-reverse formula for TS 9.5/10.

Thank you very much, Tom. Tomorrow I'll send you an e-mail.

Reply With Quote
  #9 (permalink)
 murty 
New York, NY/USA
 
Experience: Master
Platform: MetaTrader
Trading: ES
Posts: 7 since Mar 2013
Thanks Given: 1
Thanks Received: 6

I modified it but still needs a lot more before this strategy generates any hope

 
Code
Input: StopRev(14), p(5), z(1.96);
Var: range(0), zscore(0);

range = high - low;

If stddev(range, p) = 0 Then
  zscore = (range - average(range, p)) * 10000
Else
  zscore = (range - average(range, p)) / stddev(range, p);

If Absvalue(zscore) > z and close > close[p] then buy next bar at market;
If Absvalue(zscore) > z and close < close[p] then sellshort next bar at market;

If MarketPosition = 1 then Sellshort ("Reverse1") at next bar (entryprice-StopRev) Stop;
If MarketPosition = -1 then Buy ("Reverse2") at next bar (entryprice+StopRev) Stop;

Shaban View Post
Thank you very much, Tom. Tomorrow I'll send you an e-mail.


Reply With Quote
Thanked by:
  #10 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129



murty View Post
I modified it but still needs a lot more before this strategy generates any hope
;[/CODE]

For murty: Thank you and ..you have a PM

Reply With Quote
Thanked by:




Last Updated on May 1, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts