Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Thanks for all the help.
Things are looking better.
I have put the MRO headache on hold until some smaller issues can be solved and come back to the MRO issue later
The issue im working on now is:
In Tradestation if i wanted to access a previous value in a non persistent variable i would use.
value2 = average / 18; put in a new value
value3 = value2[1]; read out the previous value from the value2
In Sierra how would I get the previous value from value2 ?
I see that my post has gotten 300 + views but only 2 people stepped up to offer assistance.
Thanks again to those 2 people.
Anyway, after finding out that its a waste of time to even ask Sierra support for assistance with using their product.
Tradestation and Sierra support is like night and day.
Tradestation support steps up right away to help the users of their software, Sierra will tell you a "Its easy to program" and then don't post any example code and then never reply to the post again.
After a lot of cursing, I`m getting closer to getting the TS indicator ported over..
Now I need to know how to plot a point at a specified price on the chart at sc.index current bar.
I`m temped to just give up on Sierra charts and stick with Tradestation.
The EL language makes common sense and if you have a coding problem, the techs step up right away to answer your post until the problem is solved.
Yes, in Sierra have to create an array and loop to fill it.
double value2[11];
for ( int i = sc.Index; i >= sc.Index -10; i--)
{
value2[i] = fabs (sc.Close[i -10] - sc.Close[i]);
}
However in TS you don't have to deal with creating an array and looping to fill it.
value2= fabs (sc.Close[i -10] - sc.Close[i]);
and when you need that value later just call it.
value3=value2[1];
Unless, I`m wrong with having to loop to fill the array in Sierra?
How would I plot a dot on the chart on the current bar with Sierra?
Look at the source code i provided especially at calcArray
In Sierra you normally don't have to fill an array with a loop as it's the same as in TS or Easylanguage.
Just define an array.
While calculating your indicator (it starts from the first chart point) fill your array as well just like value2[sc.Index]
if you have defined a name and drawstyle for calcArray it plots automatically, like in TS
calcArray.Name = "myLine";
calcArray.DrawStyle = DRAWSTYLE_LINE;
Since I already have a reference that uses sc.Subgraph[0].
I used sc.Subgraph[1] unless multiple refs can use the same sc.Subgraph[0]?
Plot still isn't applied at the correct place on the chart.
SCSubgraphRef IndicatorLine = sc.Subgraph[0]; //Output line an first array
SCInputRef firstInput = sc.Input[0]; // Input for Indicator
SCFloatArrayRef calcArray = IndicatorLine.Arrays[0]; // can be used for calculations if needed
are all array definitions with a normal name like calcArray.
Those arrays are always the same size as there are bars in the chart. When loaded with auto looping
and sc.Index everything is calculated from the first bar to the last. sc.Index keeps track of it.
if you want to lookup values 3 bars to the left [sc.Index-3] and you start from 0 you should do something like:
Ok, I got the plot working now.
Issue was the setting in the study on the chart.
Even tho i had the bullish.DrawStyle = DRAWSTYLE_POINT the chart was overriding the code by having the "point high" selected in the DrawStyle.
Thanks for the help. the plotting problem is fixed.