Eliminating the need for IntraBarPersist

Questions about MultiCharts and user contributed studies.
bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Eliminating the need for IntraBarPersist

Postby bowlesj3 » 06 Aug 2019

Hi, there was a parameter created to remove the need to use IntraBarPersist on every variable. I don't seem to be able to find it in my notes. Does anyone happen to have a small example of how to use it. I will put it in my reminder system this time :-)

Thanks,
John

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Eliminating the need for IntraBarPersist

Postby Anna MultiCharts » 08 Aug 2019

Hello, bowlesj3!

Please post an example of the code that you’re trying to modify and describe what you need to achieve in more detail.

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Re: Eliminating the need for IntraBarPersist

Postby bowlesj3 » 08 Aug 2019

I found what I was thinking of buried in my notes. The parameter is [RecoverDrawings = false];
https://www.multicharts.com/trading-sof ... erDrawings

This is different. So I guess there is no way to avoid having to use the InterBarPersist over and over again as a way to get variables to retain their values between bars if one has their script set to "execute on every tick".

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: Eliminating the need for IntraBarPersist

Postby wilkinsw » 08 Aug 2019

Maybe use an ibp array if you're suffering with repetition. Autocomplete is quick anway, no?

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Re: Eliminating the need for IntraBarPersist

Postby bowlesj3 » 08 Aug 2019

Thanks wilkinsw,

Using an IntraBarPersist array is an interesting Idea. However I prefer individual self documenting names for each variable to make coming back to the code a year later (or even a lot more) a lot easier.

I had never thought of Autocomplete because I use cut and paste of the "IntraBarPersist". I will have to remember to use that for single or double entries. Often I write a chunk code and copy it up to the variables area and strip out what I don't need to create the variables (often 5 or 6 of them) then cut and past the IntraBarPersist in the front at the very end.


Return to “MultiCharts”