Support Board
Date/Time: Fri, 28 Feb 2025 18:13:27 +0000
Post From: Accessing retracement/projection price with ACSIL
[2016-07-19 16:38:53] |
User162368 - Posts: 3 |
Well, right now I am calculating the price from the fib levels, like so SCFloatArrayRef fib1LevelValues = sc.Subgraph[0].Arrays[0]; SCFloatArrayRef fib2LevelValues = sc.Subgraph[1].Arrays[0]; Tool.RetracementLevels[0] = 100.0f; Tool.RetracementLevels[1] = 61.8f; Tool.RetracementLevels[2] = 50.0f; Tool.RetracementLevels[3] = 38.2f; Tool.RetracementLevels[4] = 23.6f; Tool.RetracementLevels[5] = 0.0f; // Store price for fib1 levels for (int i = 0; i<6; i++) { // Get the retracement level float a = Tool.RetracementLevels[i]; // Calculate the price for current retracement level float price = Tool.BeginValue - (Tool.BeginValue - Tool.EndValue) * (a / 100); // Set tick size float tickSize = 0.25; // Round price to the nearest tick fib1LevelValues[i] = price - fmod(price, tickSize) + ((fmod(price, tickSize) < tickSize / 2) ? 0.0 : tickSize); } [/i][/i] I cant find anything in the documentation about getting the price from the RetracementLevels array, only visual properties. But maybe I'm looking in the wrong place? |