Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 07-30-2010, 01:18 PM   #1

Join Date: Oct 2006
Location: na
Posts: 307
Ignore this user

Thanks: 33
Thanked 89 Times in 58 Posts

How to Pass Variables into Indicators

Language: Easy language via OEC
Idea: How to determine future levels of an indicator using fixed range charts

Had an idea and thinking it would be relatively simple, but turns out not to be. Using an indicator, I will use RSI as an example, how to determine what price in the future will do to rsi. This idea works because of the range bars being fixed.

example:
4 Tick Range setting on the es. Trader knows what price the current bar will complete, and from there can see at what price the next bars will complete. So, say current bar has a high of 1205 and a low of 1204.50 ( 2 ticks, so 2 remain to complete the bar and another tick to start new bar). So as it stands, the bar will complete either at 1205.50 (needing 1205.75 to start a new bar) or 1204 (1203.75 to start new bar)

So from there, one could "know" what prices future bars will be closing at. Of course this will change when the bar makes a new high or low, so they really arent predicting anything. Just simple math.

The problem I have is passing that future level into RSI.

Code:
r=absvalue(high-low);
rem=range_setting-(r/mintick);
buy=High+(rem*mintick)+mintick;
That is how I define when the bar will complete. ( this one is used for completed up bar). It works fine and plots as it should.

Code:
RSIH= RSI (Close, RSI_Length);
So the RSI code is presumably looking for High,Low,Open,Close. If I pass my variable into the "close" in the code, it does nothing. That is just the first problem.

I need to compare what the rsi could be vs what it is in the previous bars. I tried something like:
Code:
If lastbaronchart then
CC=Buy else
CC-Close
I would use "CC" instead of "Close in the code, so it would look like this:
Code:
RSIH= RSI (CC, RSI_Length);
But that did little to nothing. So I am stumped here, I'm pretty sure something like this is possible, but I am out of ideas.

Any help is much appreciated.
trader273 is offline  
Reply With Quote
Old 09-18-2010, 04:14 AM   #2

Join Date: Jul 2010
Posts: 60
Ignore this user

Thanks: 13
Thanked 15 Times in 13 Posts

Thumbs up Re: How to Pass Variables into Indicators

HI trader237,

I can two mistakes in the following lines..

Code:
If lastbaronchart then
CC=Buy else
CC-Close
First one:- The word Buy. Buy is an reserved word of tradestation and it can be only is used in strategies to Buy the stock.

Second:-
else
CC-Close
It should be like this:-

Code:
If lastbaronchart then 
CC= Buy1 
else
CC = CC- close;
EasyTrader_I
EasyTrader_I is offline  
Reply With Quote
The Following User Says Thank You to EasyTrader_I For This Useful Post:
trader273 (09-30-2010)

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Indicators Stock.Jock Technical Analysis 10 09-21-2010 10:21 AM
Coding Cumulative Delta & Volume Delta Indicators for Multicharts tucciotrader Coding Forum 15 08-03-2010 03:52 PM
Using Indicators On Different Time Frames Stock.Jock Technical Analysis 2 07-25-2010 08:43 PM
Does OEC Provide Market Breadth Indicators? marketstudent Open E Cry 0 06-13-2010 01:47 PM

All times are GMT -4. The time now is 09:28 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.