Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 02:44:41 +0000



Post From: Hide Retracement Levels for a Price Retracement Drawing using ACSIL

[2017-11-07 13:30:48]
kas64h - Posts: 87
Thank you for your reply.

Originally I don't think you were mistaken about this. I can see you've since edited your first post, but as I made reference in my initial response, I tested it too, and setting a retracement level to FLT_MAX did indeed hide it and all subsequent levels from both the chart and the Retracement Properties window.

In the latest release (1635), I can see this behaviour has now changed and is now as you've described in your latest post. I'm assuming it has something to do with the introduction of the LevelShow[] member (which I could see in one of the Sierra Header files), and which has subsequently been backed out (there was an indirect reference to it in the 1635 release notes).

Either way, having now tested it again, I can see setting a particular retracement level to FLT_MAX does indeed hide it from the chart and importantly unchecks the 'Show' field in the Retracement Properties window (rather than completely removing the level from the properties as was previously the case).

This is a vast improvement and as you rightly point out only affects the specific Retracement level and leaves all subsequent levels intact.

Having now tested the current behaviour, two further questions remain:

1) How do I test in code that a specific Retracement level is shown or hidden?

So for example if I loop through a Tool's Retracemnt levels using:

for (float& Retracement : Tool.RetracementLevels)

I can then set:

Retracement = FLT_MAX;

and it will be hidden on the chart and it's show field will be unchecked in the Retracement Properties window.

Perfect so far, but if I subsequently perform the loop iteration, what member property tells me if a specific retracement level is shown or hidden?

The Retracement level is still present in the Tool.RetracementLevels array, which is exactly as it should be, but as far as I can tell, having set its value to FLT_MAX to hide it, I have no way of reading that value later in code to ascertain if it's shown or hidden.

I'm assuming that's why the LevelShow[] member was originally introduced, but I'm guessing it caused problems and was therefore removed.

2) In code, how do I hide (or subsequently show), the Retracement baseline (by which I mean the line connecting the Tool Anchors). In the front end (Retracement Properties window), it's done by checking/unchecking the Show field for the very top level, which is denoted as a Level % of 'Tool'. I can't see how to do this in ACSIL?

Many thanks for the improvements made so far and any further assistance is much appreciated.