Very new to this coding thing . I have the start of a code I'm writing and for the life of me cant get this to work. Been running some correlations and linear regression test on all the data I've tracked and am trying to test some theories.
Any help would be greatly appreciated. I'm trying to code in where I could multiply the volume I'm getting for a time period by different numbers I'm getting from my regression data.
Any help would be greatly appreciated. I'm trying to code in where I could multiply the volume I'm getting for a time period by different numbers I'm getting from my regression data.
Code:
def startCounter = SecondsFromTime(startTime);
def endCounter = SecondsTillTime(endTime);
plot targetPeriod = if startCounter >= 0 and endCounter >= 0 then 1 else 0;
rec volumeTotal = if targetPeriod and !targetPeriod[1] then volume else if targetPeriod then volumeTotal[1] + volume else volumeTotal[1];
AddLabel(yes, Concat("Target Period Volume: ", volumeTotal), Color.GRAY);
Last edited by a moderator: