Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

Welcome Guests
Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.
Search the Community
Showing results for tags 'array'.
Found 6 results

Hi, reading here and there posts in the forum, from coding forum to trading indicators to array ecc... I've never found a code about Volume Profile. Many codes about Market Profile (TPO) , market delta and something about Peak of Volume at Price (PVP) which is called "mode" in statistic language, but nothing about a good Volume profile accurate to the tick. I've read posts from TAMS about ARRAY (very good and useful), code from DBantina about PVP (MODE) using tick chart, which could be a very good beginning, but nothing again about the Volume profile, so I've decided to create a new one searching someone who could help me. This is my start and my steps: (1) I've a GKMarketProfileTL (see txt attached files) which uses trend lines, but it's a proxy and not accurate to the tick because it uses minutes chart (1 minute chart in the best way). This indicator is not so useful because with trendlines, it's difficult to plot a volume profile for each day. Trend lines could be useful to plot a single Volume profile for the last day or for a cumulative profile made of more than one day. Then it's not so accurate (not to the tick ). (2) I've a second indicator which plots TPO MarketProfile (see txt attached below with its functions) which uses ASCII scripts as I'd like, but it calculates TPO and not Volume Profile. I've modified it to plot NOT only letters (put in inputs letters = false), but even ASCII scripts like "". The problem with this indicator is that it's very difficult to decode and modify for my experience. Maybe its functions are useful to plot ascii scripts instead of Trendlines. So, watching these codes I'd like to create a Volume Profile code (indicator) which plots an histogram for each single day (session) using ASCII scripts instead of trendlines. It should be accurate to the tick, so I MUST calculate it on a tick chart. Doing this, I've copied a DBantina logic (code): on a 1 tick chart based on Trade Volume, calculate a range of each day and reset it each day. STEP ONE: //I've made a counter for each tick of the chart reset each day if date > Date[1] then begin MyOpen = open; MyHigh = High; MyLow = low; MyClose = close; counter = 1; end; If Date = date[1] then begin If high > MyHigh then MyHigh = High; If Low < MyLow then MyLow = Low; if time >= Sess1endtime then MyClose = close; If time < Sess1endtime and lastbaronchart then MyClose = close; counter = counter + 1; end; RangeDay = MyHigh  MyLow; STEP TWO Then I have to identify the lines for each day for each Volume profile Histogram: TickScale = minmove/priceScale; NLines = RangeDay /TickScale; STEP Three Now I've to create an ARRAY (dinamic) to identify the volume for each line of the histogram. I Think that this is correct. MyVol = iff(bartype < 2, Upticks + Downticks, volume); Array: HISTO[](0); if date > date[1] then begin Array_SetMaxIndex(Histo, NLines); // resize the array each day HISTO[iPrice] = 0; // rest to zero each day TotalVolume = 0; END; STEP FOUR Now I've to populate the array with volume for each line level on each tick (1 tick chart). for iPrice = 0 to NLines begin Histo[iPrice] = 0; end; for jBar = 0 to (counter1) begin jLow = (L[jBar]  MyLow)/TickScale); jHigh = (H[jBar]  MyLow)/TickScale); if ((jHigh  jLow) > 0) then begin deltaVol = MyVol[jBar]/(jHigh  jLow); for iPrice = jLow to jHigh begin Histo[iPrice] = Histo[iPrice] + deltaVol; TotalVolume = TotalVolume + deltaVol; end; end; NOW if my thoughts are correct, the array Histo[iPrice] should be the Volume profile data and I've to Plot them using a way that permit me to plot ASCII scripts as in the TPO indicator. AM I correct ??? Could someone give me an help to coding Volume Profile At this point I don't know how to go on :crap: THANKS AndyTick GKMarketProfile TL.txt TPO Pro5.0b.txt nutpstr (function  numeric).txt curletstr_AL (function  numeric).txt curletstr (function  numeric).txt

This thread is about Arrays. Array Declares one or more names as arrays, containing multiple variable data elements; specifies the array structure, data elements type and initial value, update basis, and data number, for each of the arrays. Data elements type can be numerical, string, or true/false. The number of elements in an array can be fixed or dynamic (unlimited). In arrays with a fixed number of elements, the elements can be arranged in single or multiple dimensions. A onedimensional 10element array contains 10 elements, a twodimensional 10element by 10element array contains 100 elements, a threedimensional 10 by 10 by 10 element array contains 1000 elements, a fourdimensional 10 by 10 by 10 by 10 element array contains 10000 elements, etc. The maximum number of array dimensions in EasyLanguage is 9. Each element in an array is referenced by one or more index numbers, one for each of the dimensions. Indexing starts at 0 for each of the dimensions. Dynamic arrays (arrays with an unlimited number of elements) are onedimensional, and are initialized at declaration as having only one element. Declared dynamic arrays can be resized using Array_SetMaxIndex. Elements can be manipulated individually or as a group, in all or part of an array. Usage Array:<IntraBarPersist>ArrayName1[D1,D2,D3,etc.](InitialValue1<,DataN>), <IntraBarPersist>ArrayName2[D1,D2,D3,etc.](InitialValue2<,DataN>), etc... Parameters inside the angled brackets are optional Parameters IntraBarPersist  an optional parameter; specifies that the value of the array elements is to be updated on every tick If this parameter is not specified, the value will be updated at the close of each bar. ArrayName  an expression specifying the array name The name can consist of letters, underscore characters, numbers, and periods. The name cannot begin with a number or a period and is not casesensitive. D  a numerical expression specifying the array size in elements, starting at 0, for each of the dimensions; a single expression specifies a onedimensional array, two expressions specify a twodimensional (D1 by D2) array, three expressions specify a threedimensional (D1 by D2 by D3) array, etc. A dynamic array, with an unlimited number of elements, is specified by the empty square brackets: [] and will be a onedimensional array. InitialValue  an expression, specifying the initial value and defining the data type for all of the elements in the array The value can be a numerical, string, or true/false expression; the type of the expression defines the data type. DataN  an optional parameter; specifies the Data Number of the data series the array is to be tied to If this parameter is not specified, the array will be tied to the default data series. Examples Declare Length and SFactor as 9element onedimensional numerical arrays with data elements' initial values of 0: Array: Length[8](0), SFactor[8](0); Declare Max_Price as a 24element by 60element twodimensional numerical array, updated on every tick, tied to the series with Data #2, and with data elements' initial values equal to the value of Close function: Array:IntraBarPersist Max_Price[23,59](Close,Data2); Declare Highs2 as a dynamic numerical array with data elements' initial values of 0: Array:Highs2[](0); source: EasyLanguage manual

i have recently installed the old version of TradeStation, the 2000i and i am not able to find both functions/reserved words Array_GetMaxIndex Array_SetMaxIndex they do not seem to be a reserved word or function in this version of TradeStation. i would apreciate it if anyone here could post both functions as text or let me know if there is another way to reduce the number of index places inside an array after they have been verified. i could program the Array_GetMaxIndex myself but i am not sure how to handle the other one

I am trying to write a multitimeframe system in Easylanguage. I basically have a higher timeframe system that works but would like to add some lower time frame logic to it to make it better. I have created arrays for the higher time frame o h l and c. When I try to use xaverage on those arrays, Multicharts complains of incorrect argument type. I assume this is because the Xaverage requires NumericSeries as input and not an array. How do I get around this?

Was trying to find an easy way to find the median of a given set of numbers. I've searched the pdf files that are available and the only thing remotely close was related to activity bars, so that didnt really help. anyone got an ideas?

I need help in EasyLanguage. Can user function in TradeStation 8 return array. If can, then how? Thx.