Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Help on Real Code MaxHigh() Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
costerlund
Posted : Thursday, August 20, 2009 12:46:53 PM
Registered User
Joined: 6/13/2009
Posts: 3
Not getting much sleep but having a great time trying to get my indicator to work.I am trying to use the MaxHigh(period) and minLow(period) i get not declared errorI want to divide this range up into segments and Plot horizontal lines with different colorsPlot only wants to plot one line Finely i need a Log function the lets me determine the Base "Log(number,base)'I have experience with EXCE bun none with VB.Thanks for any help you can give me.
Bruce_L
Posted : Thursday, August 20, 2009 2:19:05 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
QUOTE (costerlund)
Not getting much sleep but having a great time trying to get my indicator to work.I am trying to use the MaxHigh(period) and minLow(period) i get not declared error

If you are just using MaxHigh(Period) or MinLow(Period) you will get an error message. MaxHigh() and MinLow are methods that can be applied to Price, Volume or Indicators that have been Dragged and Dropped into RealCode.

RealCode Programmers Reference

RealCode itself only has built in syntax for Price and Volume. Dragging and Dropping an Indicator or Rule into the RealCode Editor will create a line in your RealCode creating a variable containing the values for that Indicator or Rule that looks something like the following:

'# PH = indicator.PriceHistory

The exact syntax of this line as well as the variable name given (in this case PH) will vary depending on the Indicator or Rule that is Dragged and Dropped into the RealCode Editor. The variable name given might be the same as one of the other variables. If this is the case, you will need to edit the variable name used manually so it is not the same as another variable. In a RealCode Paint Brush, Line is automatically used as the variable name for the Indicator being Painted without Drag and Drop being required.

Price, Volume and the variables assigned to any Dragged and Dropped Indicators and Rules are accessed by adding a period (.) and one of the following keywords (so Price could be accessed in your RealCode using Price.Close for example but not by simply using Price by itself). While all of these keywords should make sense when applied to Price, they may not apply or make sense when applied to Volume or the variable associated with a Dragged and Dropped Indicator or Rule (for one thing, a lot of data is Line data instead of Bar data).

Close returns the Closing value for the currently calculating bar (same as Last and Value, so try another if it doesn't work).

Close(offset) returns the Closing value for the offset number of bars ago (same as Last and Value, so try another if it doesn't work).

Last returns the Closing value for the currently calculating bar (same as Close and Value, so try another if it doesn't work).

Last(offset) returns the Closing value for the offset number of bars ago (same as Close and Value, so try another if it doesn't work).

Value returns the Closing value for the currently calculating bar (same as Close and Last, so try another if it doesn't work).

Value(offset) returns the Closing value for the offset number of bars ago (same as Close and Last, so try another if it doesn't work).

MaxClose(period) returns the maximum close in the last x number of bars (period).

MaxClose(period, offset) returns the maximum close in the x number of bars (period) ending offset bars ago.

MinClose(period) returns the minimum close in the last x number of bars (period).

MinClose(period, offset) returns the minimum close in the x number of bars (period) ending offset bars ago.

Open returns the Open value for the currently calculating bar.

Open(offset) returns the Open value for the offset number of bars ago.

MaxOpen(period) returns the maximum Open in the last x number of bars (period).

MaxOpen(period, offset) returns the maximum Open in the x number of bars (period) ending offset bars ago.

MinOpen(period) returns the minimum Open in the last x number of bars (period).

MinOpen(period, offset) returns the minimum Open in the x number of bars (period) ending offset bars ago.

High returns the High value for the currently calculating bar.

High(offset) returns the High value for the offset number of bars ago.

MaxHigh(period) returns the maximum High in the last x number of bars (period).

MaxHigh(period, offset) returns the maximum High in the x number of bars (period) ending offset bars ago.

MinHigh(period) returns the minimum High in the last x number of bars (period).

MinHigh(period, offset) returns the minimum High in the x number of bars (period) ending offset bars ago.

Low returns the Low value for the currently calculating bar.

Low(offset) returns the Low value for the offset number of bars ago.

MaxLow(period) returns the maximum Low in the last x number of bars (period).

MaxLow(period, offset) returns the maximum Low in the x number of bars (period) ending offset bars ago.

MinLow(period) returns the minimum Low in the last x number of bars (period).

MinLow(period, offset) returns the minimum Low in the x number of bars (period) ending offset bars ago.

NetChange returns the net change from the previous bar.

NetChange(NetChangePeriod,BarsToOffset) returns the net change for the specified period and offsets x bars ago with the BarsToOffset. NetChange(1,0) is equivalent to NetChange().

PercentChange returns the percent change from the previous bar.

PercentChange(PercentChangePeriod,BarsToOffset) returns the percent change for the specified period and offsets x bars ago with the BarsToOffset. PercentChange(1,0) is equivalent to PercentChange().

TradeRange returns the High minus the low for the current bar.

TradeRange(offset) returns the High minus the low for the offset number of bars ago.

QUOTE (costerlund)
I want to divide this range up into segments and Plot horizontal lines with different colorsPlot only wants to plot one line

RealCode Indicators currently are only able to Plot one Line or Bar (you can output up to four Values when Plotting a Bar). I do not know of a way around this beyond creating multiple Indicators.

QUOTE (costerlund)
Finely i need a Log function the lets me determine the Base "Log(number,base)'

I'm not a programmer and I'm not sure exactly what you want to do, but I suspect you would want to use System.Math.Log(x, base) for these types of calculations.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.