Scanning for indicator changes across 2 bars - TradeStation | futures io social day trading
futures io futures trading


Scanning for indicator changes across 2 bars
Updated: Views / Replies:743 / 9
Created: by 10handles Attachments:0

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
 
Thread Tools Search this Thread
 

Scanning for indicator changes across 2 bars

  #1 (permalink)
Elite Member
San Francisco CA
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: Options
 
Posts: 10 since Apr 2014
Thanks: 4 given, 2 received

Scanning for indicator changes across 2 bars

Hello,

Noob here. Trying to figure out how to do the following. I want to scan for stocks that meet the following criteria:

Previous Bar: DMI (-) is greater than DMI (+)
Current Bar: DMI (+) is greater than DMI (-) and DMI (+) is greater than a value such as 25.

I have not had any luck figuring out how to make TradeStationís scanner look back to previous bars. Is this even possible via Scanner? Is it possible using a custom indicator?

I don't know EL. Any help is greatly appreciated.

Reply With Quote
 
  #2 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Hi 10handles,

I couldn't find right away how to reference the previous bar in the scanner, maybe someone else knows. However you can use this custom indicator I created for you to do the testing. When your scan conditions are met it will return +1 and 0 if not. So you need to display those symbols that return 1 in the scanner.

You can reference previous bar's values with brackets and the number within the brackets is how many bars back you want to go back from the current bar. So oDMIPlus[1] in the code below would be the value for DMI(+) from the previous bar.

Have a great weekend.

Regards,
ABCTG

 
Code
inputs: 
	Length( 14 ), 
	ADXTrend( 25 ) ,
	UpperThreshold( 25 );

variables: 
	vResult( 0 ),
	oDMIPlus( 0 ), 
	oDMIMinus( 0 ), 
	oDMI( 0 ), 
	oADX( 0 ), 
	oADXR( 0 ), 
	oVolty( 0 ) ;

Value1 = DirMovement( H, L, C, Length, oDMIPlus, oDMIMinus, oDMI, oADX, oADXR, 
 oVolty ) ;

{check conditions 
Previous Bar: DMI (-) is greater than DMI (+)
Current Bar: DMI (+) is greater than DMI (-) and DMI (+) is greater than a value such as 25.}
if oDMIMinus[1] > oDMIPlus[1] and oDMIPlus > oDMIMinus and oDMIPlus > UpperThreshold then
	vResult = + 1
else
	vResult = 0 ;	

Plot1( vResult, "Result" ) ;

Reply With Quote
The following 3 users say Thank You to ABCTG for this post:
 
  #3 (permalink)
Elite Member
San Francisco CA
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: Options
 
Posts: 10 since Apr 2014
Thanks: 4 given, 2 received


ABCTG,

Thank you so very much. I had some problems at first but I identified the issue and it is now working.

Much obliged for your help!!

Reply With Quote
The following user says Thank You to 10handles for this post:
 
  #4 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

10handles,

you are welcome. How did you overcome the issues you have been facing?

Regards,
ABCTG

Reply With Quote
 
  #5 (permalink)
Elite Member
San Francisco CA
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: Options
 
Posts: 10 since Apr 2014
Thanks: 4 given, 2 received

Hello ABCTG,

The first thing I did was remove the ADXTrend and UpperThreshold inputs, and replaced UpperThreshold in the conditions area with the value 25. Although I don't really know if this had much, if any, effect.

What seemed to have the most effect was in the Scanner, changing the "Load Additional Data" value from 1 to 300. As soon as I did that, I was starting to see some "1s". I didn't bother to go back and change the code to the original code...at least not yet.

Thanks again.

Reply With Quote
The following user says Thank You to 10handles for this post:
 
  #6 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

10handles,

thanks for the feedback. Loading Additional Data is what did the trick. The reason is that the indicator needs a certain amount of data to properly calculate. If you load less than the needed amount Tradestation will not plot anything.
In the case of the ADX at least an amount equal to the Length input is needed to give a result.

Regards,
ABCTG


10handles View Post
What seemed to have the most effect was in the Scanner, changing the "Load Additional Data" value from 1 to 300. As soon as I did that, I was starting to see some "1s". I didn't bother to go back and change the code to the original code...at least not yet.


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #7 (permalink)
Elite Member
San Francisco CA
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: Options
 
Posts: 10 since Apr 2014
Thanks: 4 given, 2 received

Hello again,

I've been trying to adapt your code to work with other indicators but I am not having any luck.

What I'd like to do is scan for the MoneyFlow indicator turning down (or up). If I can get this working for one indicator such as MoneyFlow then I imagine it would not be too difficult to adapt the code to work for other indicators as well. Was hoping to piggy back off the DMI indicator code but that hasn't worked. Is this something you might be able to help me with? Thanks in advance.

Reply With Quote
 
  #8 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

10handles,

if you post your code modifications you are having trouble with, I will take a look at it and try to steer you into the right direction.

Regards,
ABCTG

Reply With Quote
 
  #9 (permalink)
Elite Member
San Francisco CA
 
Futures Experience: Beginner
Platform: TradeStation
Favorite Futures: Options
 
Posts: 10 since Apr 2014
Thanks: 4 given, 2 received

Thanks. Here is what I have and I'm sure it is way off. I don't know EL.

inputs:
Length( 14 );

variables:
vResult( 0 ),
oMoneyFlow( 0 ) ;

Value1 = DirMovement( C, Length, oMoneyFlow ) ;

if oMoneyFlow < oMoneyFlow then
vResult = +1
else
vResult = 0 ;

Plot1( vResult, "Result" ) ;

Reply With Quote
 
  #10 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


10handles,

you are trying to call the Moneyflow results from a function that computes the ADX. Take a look at the build in Moneyflow indicator that gives you a good idea on how to call the moneyflow function and use the value later in your code.
In Easylanguage you can reference values from previous bars by adding a square bracket to your variable. The number within the brackets is the number of bars you want to go back where 0 is the current bar.
So oMoneyFlow[1] would be the value from the previous bar. You will need to use this to check if the moneyflow is rising or falling.

Regards,
ABCTG





10handles View Post
Thanks. Here is what I have and I'm sure it is way off. I don't know EL.

inputs:
Length( 14 );

variables:
vResult( 0 ),
oMoneyFlow( 0 ) ;

Value1 = DirMovement( C, Length, oMoneyFlow ) ;

if oMoneyFlow < oMoneyFlow then
vResult = +1
else
vResult = 0 ;

Plot1( vResult, "Result" ) ;


Reply With Quote

Reply



futures io > > > > Scanning for indicator changes across 2 bars

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
Automated Scanning then Trading evanevans TradeStation 1 January 14th, 2014 05:37 PM
Automatically scanning market for stocks which meet criteria tradingblitz NinjaTrader 3 September 22nd, 2013 01:26 AM
filtering and scanning software/wesbsite/too Sunny42 Platforms and Indicators 4 August 8th, 2012 01:30 PM
Fib Retracement Scanning derekb777 ThinkOrSwim 2 May 22nd, 2012 05:12 PM


All times are GMT -4. The time now is 03:35 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-16 in 0.13 seconds with 19 queries on phoenix via your IP 54.196.201.241