Donchian Scalper - NinjaTrader | futures io social day trading
futures io futures trading


Donchian Scalper
Updated: Views / Replies:2,630 / 10
Created: by tamerrashdan Attachments:14

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 14  
 
Thread Tools Search this Thread
 

Donchian Scalper

  #1 (permalink)
Elite Member
New York
 
Futures Experience: Beginner
Platform: NT
Broker/Data: AMP/CQG
Favorite Futures: ES
 
Posts: 122 since Oct 2011
Thanks: 13 given, 73 received

Donchian Scalper

Attached, please find an automated strategy based on Donchian Channel
The strategy loses around $2000 a day and when reversed it loses around $4000 a day on TF 4-range chart with 10/10 tick target/stoploss
Can anyone take a look and suggest any changes to be made so that we can go against the reverse strategy at the same entry price +/- 1 tick so that instead of losing $4000 a day we can make even half that much
Please set T 51. UseDeltaStopLoss to False
I need to warn everybody against running this strategy or its reverse using real money as he will lose a lot of money for sure
Please let me know what you guys think
Thank you

Attached Files
Register to download File Type: zip PVDonchianScalper_source.zip (9.4 KB, 55 views)
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,356 given, 83,237 received


Hopefully someone will help you.

If they do, then you will learn that this does not work.

You cannot take a losing strategy, reverse it, and turn it into a winning strategy. A losing strategy is a losing strategy.

If you kept every single trade identical, and just took the opposite position - fine. But that will never happen. And while you could program a backtest to do this, on historical data, it would never work going forward on live data/trading.

The reasons are many: slippage and news for one, and then a whole slew of psychological problems that exist even with automated strategies.

I am speaking from experience. I think every programmer that found a losing strategy probably tries to make it a winning strategy by reversing it.

Doesn't work. Instead, what ends up happening is you keep modifying the strategy, adding "filters" and so forth, until it's now overly curve fitted to historical data that has no bearing on the future market. This is where nearly all automated trading paths lead -- over curve fitting, and very few people truly understand it well enough to avoid it.

There are several good webinars on automated trading in the webinar section of futures.io (formerly BMT), including those by @kevinkdog, that are worth watching for a basic understanding of proper design and testing.

Hopefully others will give you their input as well.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 7 users say Thank You to Big Mike for this post:
 
  #4 (permalink)
Elite Member
New York
 
Futures Experience: Beginner
Platform: NT
Broker/Data: AMP/CQG
Favorite Futures: ES
 
Posts: 122 since Oct 2011
Thanks: 13 given, 73 received

Thanks


Sent from my iPhone using Tapatalk

Reply With Quote
 
  #5 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,356 given, 83,237 received


tamerrashdan View Post
Thanks

I do hope someone will do as you ask. Just reverse the EnterLong with EnterShort and so forth, and you'll see it doesn't work.

You could "force" it only by keeping an exact entry/exit time for every trade, and programatically taking the opposite position. But that is worthless and only would show useful on a backtest.

The reason swapping EnterLong and EnterShort doesn't work is simple.

Let's pretend (ignoring for a moment that scalping is a terrible method):

Trade #1 - Enter long @ 9am, exit for loss @ 9:30am
Trade #2 - Enter short @ 9:35am, exit for loss @ 9:40am
Trade #3 - Enter short @ 9:50am, exit for profit @ 9:58am

If you swap the EnterLong and EnterShort's it may look something like this:

Trade #1 - Enter short @ 9am, exit for loss @ 9:39am
Trade #2 - Enter long @ 9:48am, exit for loss @ 9:56am
Trade #3 - Enter short @ 10:04am, exit for loss @ 10:10am

See, everything changes because you flipped the signal. It's not a 1:1 relationship. This will be proven to you if someone makes the changes to your code.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #6 (permalink)
Elite Member
New York
 
Futures Experience: Beginner
Platform: NT
Broker/Data: AMP/CQG
Favorite Futures: ES
 
Posts: 122 since Oct 2011
Thanks: 13 given, 73 received

There is already a reverse option in the strategy
Problem is that the entry prices are different and trying to enter manually against the strategy sometimes doesn't work


Sent from my iPhone using Tapatalk

Reply With Quote
 
  #7 (permalink)
Elite Member
Florida
 
Futures Experience: Advanced
Platform: NinjaTrader 8
Favorite Futures: YM, ES, NQ, CL, ZB
 
trendwaves's Avatar
 
Posts: 742 since Dec 2012
Thanks: 2,822 given, 2,433 received

First Test

I took a quick'ish look at your code just to get a feel for what you have going on.

I then ran a couple of quick tests on some historical data. I was not able to get your start time code to work properly, so my test runs include some pre-market trades.

I selected a random day in the middle of august and downloaded the TF replay data for that day. I have no idea what the chart looks like, just to keep my simple test unbiased.

I started with a 1 minute chart and set a few parameters, which generated a profit for the day. (See attached snapshot's for details). I set the profit target to 100 ticks, otherwise used your 10 tick stop loss. At first look the auto trail 1 and 2 didn't make any sense to me, I was not able to understand the intent of how it is supposed to work ?

I then set the reverse flag to True , and the result was a small loss for the day.

I then changed the time frame to 15 minutes and ran the reverse test again which produced a profit for the day.

I will go back and look at the code in relation to the reverse logic in specific for any idea to answer your actual question.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Be Patient and Trade Smart
Reply With Quote
The following user says Thank You to trendwaves for this post:
 
  #8 (permalink)
 Vendor: www.probabletrades.com 
OC, California, USA
 
Futures Experience: Advanced
Platform: IB/TWS, NinjaTrader, thinkorswim
Favorite Futures: stocks, options, futures, VIX
 
shodson's Avatar
 
Posts: 1,860 since Jun 2009
Thanks: 480 given, 3,255 received

A few words of advice

I would only take signals where the candle was at least 80% or more body, not so much wick. Also, did the candle close near the highs or lows of the bar? Think about it: if you have a candle that makes a new high/low, but it is rejected with counter selling/buying, then that's a weak breakout candidate. If a buy signal's bar closes on or near the highs, then it's a good buy signal. If it's retraces to a doji-like formation, weak entry. Look for volume patterns too.

Also, I wouldn't use fixed-tick targets/stops, use a percentage of ATR, that way it adjusts to the current market volatility regime. A 10 tick move in August was a lot easier to achieve than a 10 tick move in June.

Check when it works best (hours of the day, days of the week, etc). Beware of data-mining here though.

Reply With Quote
The following user says Thank You to shodson for this post:
 
  #9 (permalink)
Elite Member
Florida
 
Futures Experience: Advanced
Platform: NinjaTrader 8
Favorite Futures: YM, ES, NQ, CL, ZB
 
trendwaves's Avatar
 
Posts: 742 since Dec 2012
Thanks: 2,822 given, 2,433 received

I applied Shodson's advice to the Dochian scalper strategy with respect to the 'reverse' logic and came up with this code and result...

 
Code
				if (reverse)
				{
					if ((DonchianChannel(period).Upper[1] > DonchianChannel(period).Upper[2]) && (High[0] < DonchianChannel(period).Upper[0]))
						ss = true;
					if ((DonchianChannel(period).Lower[1] < DonchianChannel(period).Lower[2]) && (Low[0] > DonchianChannel(period).Lower[0]))
						ls = true;
				}
				else
				{
					if (DonchianChannel(period).Upper[0] > DonchianChannel(period).Upper[1])   // can't be much simpler... 
						ls = true;
				
					if (DonchianChannel(period).Lower[0] < DonchianChannel(period).Lower[1])
						ss = true;
				}
				
				
				
				if (ls && ss && takeLongs && takeShorts){
					if (debug)
						PrintWithTimeStamp(this.Name + " Both long and short signal at same time, ignored");
					ls = ss = false;
				}
					
///				if (reverse){
///					bool tmp = ls;
///					ls = ss;
///					ss = tmp;
///				}
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Be Patient and Trade Smart
Reply With Quote
The following 2 users say Thank You to trendwaves for this post:
 
  #10 (permalink)
Elite Member
Florida
 
Futures Experience: Advanced
Platform: NinjaTrader 8
Favorite Futures: YM, ES, NQ, CL, ZB
 
trendwaves's Avatar
 
Posts: 742 since Dec 2012
Thanks: 2,822 given, 2,433 received


This morning I modified the reverse code to look at only the Dochian channel in filtering the reversal signals. So, instead of looking at the current candle, the logic now compares the current channel level to the level for the previous bar.

The code and results are below, basically it had little effect on the strategy performance. I think this code/logic modification better maintains the original intent of the strategy author to have a pure (and simple) Dochian channel signal. Looking at or comparing candles drifts into interpreting price action and moves away from a pure Dochian channel signal.

 
Code
				
				if (reverse)
				{
					if ((DonchianChannel(period).Upper[1] > DonchianChannel(period).Upper[2]) && (DonchianChannel(period).Upper[0] == DonchianChannel(period).Upper[1]))
						ss = true;
					if ((DonchianChannel(period).Lower[1] < DonchianChannel(period).Lower[2]) && (DonchianChannel(period).Lower[0] == DonchianChannel(period).Lower[1]))
						ls = true;
				}
				else
				{
					if (DonchianChannel(period).Upper[0] > DonchianChannel(period).Upper[1])   // can't be much simpler... 
						ls = true;
				
					if (DonchianChannel(period).Lower[0] < DonchianChannel(period).Lower[1])
						ss = true;
				}
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Be Patient and Trade Smart
Reply With Quote
The following user says Thank You to trendwaves for this post:

Reply



futures io > > > > Donchian Scalper

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Donchian cross GaryD NinjaTrader 25 September 9th, 2017 12:24 PM
Donchian Channel for EasyLanguage Big Mike EasyLanguage Programming 16 September 27th, 2015 04:45 AM
Donchian Channel with Fibo levels? Momozo NinjaTrader 7 July 6th, 2015 02:38 PM
Donchian's Rules for Trading Commodities Anagami The Elite Circle 4 January 25th, 2015 04:15 PM
ninja 7 donchian channel bobarian NinjaTrader 3 March 10th, 2011 08:33 PM


All times are GMT -4. The time now is 09:13 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-18 in 0.18 seconds with 20 queries on phoenix via your IP 107.20.115.174