I am attempting to create a new series in 5.5. Error msg tells me that I am mistaken in my usage of PRICECLOSE, BAR & BARNUM.
I've searched the programming guide, but can't figure out what I am doing wrong.
Would appreciate some help here. Below, you will find the 4.5 code, the WSTL translation & how far I got in 5.5 before I got stuck.
Here is 4.5 code: --- This works great
CODE:
Please log in to see this code.
Here is WSTL code: --- This also works great
CODE:
Please log in to see this code.
Here is the 5.5 code where I ran into trouble:
It tells me I am using PriceClose, Bar & Barnum incorrectly.
CODE:
Please log in to see this code.
Thanks in advance,
Ted
Size:
Color:
There are no PriceClose, PriceOpen and BarNum any more:
PriceClose = Close[bar]
PriceOpen = Open[bar]
BarNum = IntradayBarNumber
Hint: see the WealthScript Guide > DataSeries and in the QuickRef.
Size:
Color:
Thanks Eugene,
I made the substitutions you suggested and all errors vanished.
One question:... Is "(double)Close[Bar]" same thing thing as "Bars.Close[Bar]" ? They both Compile, just want to be sure I used correct one.
Here's the code as it stands now:
CODE:
Please log in to see this code.
Thanks for tips!
Ted
Size:
Color:
QUOTE:
One question:... Is "(double)Close[Bar]" same thing thing as "Bars.Close[Bar]" ? They both Compile, just want to be sure I used correct one.
Bingo! I just wanted it to keep it simple.
By the way, you may drop the so called cast i.e.
(double) - it's not required here: Close[bar] would be enough.
Size:
Color:
Thank You!
I've managed to get the 5.5 syntax correct all the way thru the Buying loop. Selling loops are proving more challenging, but making progress.
Happy Thanksgiving.
Size:
Color:
I was looking for an automated way to convert my code and just registered for the 5.5 site. It looks like I am SOL and have to re-write the code. Does anyone have a code converter?
Size:
Color:
Size:
Color: