priceClose() in TMF

Posted By: felixfx

priceClose() in TMF - 10/23/19 19:57

In the TMF, priceClose() references the last tick of the bar rather than the actual Close of the bar.
Is there a way to access the last bar close and last bar open in the TMF?

also, if I was to use within a TMF if(crossOver(priceClose(), VARIABLE)) { do this action; } I get an error: Pointer Expected.
Is there a proper way of doing this?
Posted By: AndrewAMD

Re: priceClose() in TMF - 10/23/19 20:11

Save the
Originally Posted by felixfx
In the TMF, priceClose() references the last tick of the bar rather than the actual Close of the bar.
Is there a way to access the last bar close and last bar open in the TMF?
Save each value to an AssetVar.

Originally Posted by felixfx
also, if I was to use within a TMF if(crossOver(priceClose(), VARIABLE)) { do this action; } I get an error: Pointer Expected.
Is there a proper way of doing this?
You supplied a var when you need to supply a vars.
Posted By: felixfx

Re: priceClose() in TMF - 10/24/19 17:22

Originally Posted by AndrewAMD
Save each value to an AssetVar.


so in other words
#define CLOSE0 close[0]
#define CLOSE1 close[1]
// etc

function run()
{ vars close = series(priceClose()); }

since I have yet to figure out how to supply a whole series to a TMF, is that even possible?

Originally Posted by AndrewAMD
You supplied a var when you need to supply a vars.

This is related to the above. If I passed individual indexes within a series of priceClose() to the TMF, I would use
if(crossOver(CLOSE0, VARIABLE) { do this action; }

if this case, I would want to use the Tick priceClose() within the TMF over a bar priceClose() from run(), so what would be the proper syntax to do this within the TMF?
Posted By: AndrewAMD

Re: priceClose() in TMF - 10/24/19 17:42

Originally Posted by felixfx
since I have yet to figure out how to supply a whole series to a TMF, is that even possible?

I explained that here:
https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=478454#Post478454
© 2024 lite-C Forums