Login Page - Create Account

Support Board


Date/Time: Sat, 19 Apr 2025 08:40:53 +0000



Post From: HOW TO REFERENCE A PREVIOUS SUBGRAPH?

[2025-04-02 17:33:12]
Trade with ICE - Posts: 25
// below block to do your processing ??? you want to execute if end of bar --> which is the first tick of the next bar

if (sc.Index > PriorTickBarNum)
{
// execute this block of code if this is 1st tick of new bar
PriorTickBarNum = sc.Index;
IsItNewBar = 1; // you may not need this variable
// Do what you want. process prior VAH/VAL, etc. Save them to some persistent variables other than Prior variables
// I use 2 sets of vars - one set holds the VAH variables during the bar to keep the most recent values
// Move PriorTemp vars to PriorVAH, PriorVAL, etc
// Do what ever else drawing, processing you want
// last thing is to move the VAH, etc to PriorTemp??? vars
}
else
// save the VAH, etc to temp prior variables to keep the most updated VAH, etc of the bar for each new tick
{
TempPriorVAH = VAH;
TempPriorVAL = VAL;
// you could either return here or continue on for other processing of this tick
}

This is good but way too complex for my brain.

is this code for a custom study? im just using a spreadsheet