Changing Indicators on the fly using GVs & recalculate

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

Changing Indicators on the fly using GVs & recalculate

Postby bowlesj3 » 16 Aug 2011

I tried using the recalculate command to reset the bollinger bands on the fly. What recalculate does is recalculates the plot right from the beginning. I was using a Global Variable to control it but it did not work. It may have been that I did not put a timer restriction on it. It went into a loop and locked up MC. I also did it before I understood certain aspects of how MC does its hidden recalculate when the maxbarsback is exceeded. There are a few threads on the hidden recalculate where MC restarts the indicators until if finally figures out what the MaxBarsBack should be. But I believe it is possible to get it to work. I was adjusting the outer bands to try and get them to come in to touch a top or bottom of a swing in the market. In the end I decided it was better to do it manually anyway so I just send values to MC through GVs and force the recalculate until my eyes like what they see. A simple button click or two and I get what I want.
Last edited by bowlesj3 on 18 Aug 2011, edited 2 times in total.

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: The recalculate command

Postby Dave Masalov » 17 Aug 2011

bowlesj3,

Apparently, something is done incorrectly, but we cannot give any comments without looking at the script.

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

Re: The recalculate command

Postby bowlesj3 » 18 Aug 2011

No problem Dave,

TJ felt that the above post which appeared in a different thread needed a special thread. This post shows some of what can be done with an outside program and GVs.

I was just mentioning in another thread that indicators can be adjusted on the fly 2 ways (with recalculate and without it). In my case I automated wave detection and bollinger band adjustment to a certain extent. After finding at least 10 new combinations/permutations I then felt in the end I could do it much better manually with a process that helps me scan quickly without missing anything (a computerized assist rather than trying to do it all with the computer). I am sure I could get the recalculate to not go into an out of control loop by testing for full completion properly before attempting another on the fly recalculate adjustment until the full on the fly set of adjustment were completed. However while I was in the process of writing this I felt there was no point in the end if I wanted to do it manually anyway. Using an external program I was able to adjust the bands quickly with a simple button click (real fast). I used increments of 1 and 5 to speed it up (could have used 1,2,3,4,5). I was able to store a database history of my band adjustments and go back to the previous days adjustment if I wanted with a single click. I use this if the higher bar size bands are showing a wave boundary over several days and I can't remember the previous day's setting so I just pick the last history. I can also toggle the adjusted setting and the normal with a toggle button. I have at times toggled 2 or even 3 band adjustments (upper band, middle band, lower band) back to normal and back to adjusted. When you can do things like this at a moments thought it makes one wonder how useful automated adjustment is by comparison. Yeah, if there is not a bounce at the adjusted I will toggle it out to see if I can get a confirmation for a bounce on the normal setting. A computer voice reminds me to do that. I have no idea how I would program EL code to do this. LOL, maybe in my 5th life time I can figure it out and get it completed by my 6th life time.

Simpler averaged based systems have trouble with non trending markets. My approach avoids whipsaw in non trending markets (it can scalp small profits very well). It can handle basically any market (if I am sharp enough that day which isn't always the case I will admit). That is my preference. Each to his own. However if someone wants to attempt on the fly indicator adjustments with recalculate I am sure it is doable.


Return to “MultiCharts”