I have an programming question
first of all this strategy is meant for calculating all prices from the beginning but just on the last close prices;
in WL6 I had :
but I found in WL7 [idx] cannot changed to idx-- or --idx. or backwards
so the question is how I do I rewrite WL6 into the WL7 code?
---
i am establishing the highest high from the last peak; as defined by two consecutive lower highs. im am interested in the beginning but only the last. when found it is more or less the resistance priceline
--
@Eugene
correctly understood, the loop is meant to identify the high/low for support and resistence. On the intraday the action buy/sell is considered when piercing through the identified s/r lines but these s/r are not the only triggers for my b/s action.
But my question was how do I loop back? idx-- (or --idx) does not work
@Eugene
I got it :), no furher action needed. (I need to get used to wl7 C#
please close this post
first of all this strategy is meant for calculating all prices from the beginning but just on the last close prices;
in WL6 I had :
CODE:
int bar_begin = Bars.Count - 3; int bar_einde = Bars.Count - 150; for ( int bar1 = bar_begin; bar1 >= bar_einde; bar1-- ) bar-- // from the end going backwards
but I found in WL7 [idx] cannot changed to idx-- or --idx. or backwards
so the question is how I do I rewrite WL6 into the WL7 code?
---
i am establishing the highest high from the last peak; as defined by two consecutive lower highs. im am interested in the beginning but only the last. when found it is more or less the resistance priceline
--
@Eugene
correctly understood, the loop is meant to identify the high/low for support and resistence. On the intraday the action buy/sell is considered when piercing through the identified s/r lines but these s/r are not the only triggers for my b/s action.
But my question was how do I loop back? idx-- (or --idx) does not work
@Eugene
I got it :), no furher action needed. (I need to get used to wl7 C#
please close this post
Rename
Forget about this code for now. A word for word translation may be suboptimal. If you could expand on the price calculation we'd suggest an efficient way. In other words, tell us about your objective.
i am establishing the highest high from the last peak; as defined by two consecutive lower highs. im am interested in the beginning but only the last. when found it is more or less the resistance priceline
I see. Sounds like you'll be pleasantly surprised after looking at the QuickRef samples for PeakTroughCalculator. Easy detection of falling/rising peaks and troughs as well as accessing Trendlines is what it's about. Check it out first before anything else.
You could also just run your own loop backward through the data in the Initialize method, nothing's stopping you from doing that. But you won't be able to place trades in that loop, it'd be just for data crunching or analysis.
Your Response
Post
Edit Post
Login is required