A Friday afternoon thought..
As I understand, MC is driven by tick coming from the instrument that is plot. No tick or scarce in time tick (low frequency) would then mean variable to not be updated in timely manner. No tick, no variables update.
My Idea, Could it be imaginable to have a new built in instrument programmed in C or other language that would create a simulated tick. This tick could be programmed to be issued on a known time base. Doing that we could be able to have all variables updated in a real time basis instead being timed by the tick clock
Only problem is the simulated instrument would have to be place in Data1 and the regular one be placed in Data2. Orders are issued for Data1 only. (to my understanding)
I'm testing a simple delay printout. A 0.5 second delay. If I display a chart using 1 tick time base, it is easy to see that both printout and charts are updated at the same time. But it is not a tick, tack clock or a regular pace. Fast tick clock, faster printout, lower tick clock, lower printout.
If it is realizable, I don't have the knowledge to create it. If it is a crazy idea, be indulgent, it is Friday after all.
A great weekend and good summer vacations for the lucky one.
Martin
Simulated tick to clock MC. Could it be done
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Simulated tick to clock MC. Could it be done
RelalcLastBarAfter(s) where s is the number of seconds is a timer-based calculation. It gets around the need for a simulated tick. It forces the script to recalculate after an 's' number of seconds. Could be 0.5 or 30.
Re: Simulated tick to clock MC. Could it be done
InterestingRelalcLastBarAfter(s) where s is the number of seconds is a timer-based calculation. It gets around the need for a simulated tick. It forces the script to recalculate after an 's' number of seconds. Could be 0.5 or 30.
Does it take over the complete clock re-calculation. Or it is complementary to the actual bar scale time. I will read about it.
Martin
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Simulated tick to clock MC. Could it be done
Sorry, typo. Although Relalc sounds funnier.
On a serious note, this word recalculates your script based on a timer, regardless of whether any new ticks were received. So, you are not dependent on the market actually doing anything to force a calculation - useful for those slow ticking symbols and closing positions at the end of the day.
If that's what you are trying to accomplish, this is the word for you. I'm not too sure what you mean with 'complete clock recalculation' and 'complimentary to the bar scale time'.
On a serious note, this word recalculates your script based on a timer, regardless of whether any new ticks were received. So, you are not dependent on the market actually doing anything to force a calculation - useful for those slow ticking symbols and closing positions at the end of the day.
If that's what you are trying to accomplish, this is the word for you. I'm not too sure what you mean with 'complete clock recalculation' and 'complimentary to the bar scale time'.
Re: Simulated tick to clock MC. Could it be done
Thanks Stan
- How do i use ReCalcLastBarAfter(s) and or where do I place it in the code. I don't found any documentation on that.
- What is the lowest (s) value ?
Martin
- How do i use ReCalcLastBarAfter(s) and or where do I place it in the code. I don't found any documentation on that.
- What is the lowest (s) value ?
Martin
Re: Simulated tick to clock MC. Could it be done
I am also interested in this question. I think what is being asked is if the running of the code will only run every RecalcLastbarAfter(x) or if new ticks will also cause the signal to recalculate and if so, how will the two recalculation events work together, which takes preference and if a new tick comes in will the RecalcLastbarAfter(x) be reset?Does it take over the complete clock re-calculation. Or it is complementary to the actual bar scale time. I will read about it.
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: Simulated tick to clock MC. Could it be done
Martin,- How do i use ReCalcLastBarAfter(s) and or where do I place it in the code. I don't found any documentation on that.
- What is the lowest (s) value ?
This keyword forces the recalculation of the code before the normal recalculation event occurs (i.e. new tick comes in Intra-Bar Order Generation mode). For example it can be used to stop trading at the end of trading session. The lowest value is one second.
Martin and dblend,Quote:
Does it take over the complete clock re-calculation. Or it is complementary to the actual bar scale time. I will read about it.
I am also interested in this question. I think what is being asked is if the running of the code will only run every RecalcLastbarAfter(x) or if new ticks will also cause the signal to recalculate and if so, how will the two recalculation events work together, which takes preference and if a new tick comes in will the RecalcLastbarAfter(x) be reset?
If you use RecalcLastbarAfter(x), new ticks will also cause the signal to recalculate as usual. If a new tick comes in RecalcLastbarAfter(x) will be reset.