Hi
Please look at this code:
function readLevelsMxLineByIndex( LevelsMx, index, fPrice, fType, fStrength, fDateTime, fInterval, fBarIndex )
{
local tprice, tinterval, rval;
fPrice = 5;
fType = 6;
fStrength = 200;
fDateTime = SelectedValue(DateTime());
fInterval = 60;
fBarIndex = 100;
return true;
}
function create_trends_endpoints()
{
local
bi2, i, totalSRLines, trendpoints, QuickAFLBarIndex,
pPrice, pTypexx, pStrength, pDateTime,pInterval, pBarIndex;
totalSRLines = MyMxGetSize( TFSRLineMx, false );
trendpoints = False; // initialization
ptypexx=10;
for( i = 0; i <= totalSRLines - 1; i++ )
{
if( readLevelsMxLineByIndex( TFSRLineMx , i, &pPrice, &pTypexx, &pStrength, &pDateTime, &pInterval, &pBarIndex))
{
if( pTypexx != TypeRoundNumber )
// AT THIS POINT pTypexx = 10, INSTEAD OF 6 WHY????
pTypexx is set to 10, then passed to function readLevelsMxLineByIndex and is supposed to take the value 6. However it remains 10.
I am sending a screenshot from the debug mode, with a strange message:
fType= reference to ptype(=reference to ptypexx (=10))
I am sure here is the key. Somehow pType comes into play. pType is the old variable name, before I renamed it to fType.
Any idea how to fix this please?