adjust barinterval dynamically from script

Questions about MultiCharts and user contributed studies.
rst
Posts: 8
Joined: 19 Aug 2011
Has thanked: 2 times

adjust barinterval dynamically from script

Postby rst » 19 Feb 2012

Hi MC team,

I would like to know if MC can give an api that the user may have the flexibility to control a new bar creation, say if some condition is met inside the calculation of my EL script then "move to the next(new) bar".

We have already charts formed by predetermined bar interval based on #tick ,minutes, volume size etc... and on the other hand, special charts as Kagi, Three Line Breaks, Point&Figure provided by MC team which are essentialy based on dynamically bar interval.
I'm greatly interested of making similar charting that allow me to control the time frame like these special charts. Since all our buy/sell signals are generated in the end of bar there will be no problem for allowing autotrading.

Thanks for the best trading platform

User avatar
Henry MultiСharts
Posts: 8388
Joined: 25 Aug 2011
Has thanked: 1201 times
Been thanked: 2681 times

Re: adjust barinterval dynamically from script

Postby Henry MultiСharts » 21 Feb 2012

Hello Rst,

This feature has not been implemented yet. You may want to submit a feature request to the Project Management of our web site so other users can vote for it: https://www.multicharts.com/pm/
These users thanked the author Henry MultiСharts for the post:
rst

wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

Re: adjust barinterval dynamically from script

Postby wall richard » 10 Mar 2012

rst,

I am interested in the special charts with dynamical bar intervals provided by the MC team. Specifically range bar charts. Where would I find these specialty charts?

Thanks,

Stork

User avatar
TJ
Posts: 6523
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: adjust barinterval dynamically from script

Postby TJ » 10 Mar 2012

rst wrote:Hi MC team,

I would like to know if MC can give an api that the user may have the flexibility to control a new bar creation, say if some condition is met inside the calculation of my EL script then "move to the next(new) bar".

We have already charts formed by predetermined bar interval based on #tick ,minutes, volume size etc... and on the other hand, special charts as Kagi, Three Line Breaks, Point&Figure provided by MC team which are essentialy based on dynamically bar interval.
I'm greatly interested of making similar charting that allow me to control the time frame like these special charts. Since all our buy/sell signals are generated in the end of bar there will be no problem for allowing autotrading.

Thanks for the best trading platform


You can always write an indicator that "draws" a bar to any width you like, by adding new bars of the same height.

wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

Re: adjust barinterval dynamically from script

Postby wall richard » 10 Mar 2012

TJ

Sounds like a good idea to write an indicator to draw subsequent range bars and control their range dynamically. I got no assistance from EL Essential Programmers Guide. I have no idea how to "draw" a range bar. Maybe create a paint bar from OHLC? How do I program advance to next PB after the range is exceeded?

Sorry about the bother, but you seem to be the go to guy on the MC forum. Any help would be appreciated.

Thanks,

Rick

User avatar
TJ
Posts: 6523
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: adjust barinterval dynamically from script

Postby TJ » 10 Mar 2012

wall richard wrote:TJ

Sounds like a good idea to write an indicator to draw subsequent range bars and control their range dynamically. I got no assistance from EL Essential Programmers Guide. I have no idea how to "draw" a range bar. Maybe create a paint bar from OHLC? How do I program advance to next PB after the range is exceeded?

Sorry about the bother, but you seem to be the go to guy on the MC forum. Any help would be appreciated.

Thanks,

Rick


this is a good example of what you can do
Point and Figure Simulator
http://www.tradersxchange.com/viewtopic.php?f=38&t=521

if you make the bars wider, they will visually merge into a continuous block of extended bar.

Image
Attachments
point and figure (1).gif
point and figure (1).gif (86.88 KiB) Viewed 234 times

wall richard
Posts: 60
Joined: 28 Dec 2007
Has thanked: 9 times
Been thanked: 1 time

Re: adjust barinterval dynamically from script

Postby wall richard » 11 Mar 2012

Thank you TJ. Very helpful for PF simulations.

I've narrowed my search down to an indicator controlled range bar based on hidden tick data. (I suspect MC and TS bar charts are generated from large tick data arrays.) The indicator will dynamically set the range for each succeeding bar. PlotPaintbar will "draw" each bar's OHLC.

I have encountered a couple of problems. PlotPaintBar in 5.5 Users Guide is less than helpful and new MCWiki PlotPaintBar is only a copy of 5.5. Likewise TS PlotPaintBar.

Here's my question. If I plot a paintbar with a given range and the range is exceeded the paintbar should be complete. The next bar may have a different range and the process begins anew. My question is how do I proceed to the next bar after completion of the previous bar? Does MC do this automatically or do I need to code for starting a new paintbar?

Thanks,

Rick

User avatar
TJ
Posts: 6523
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: adjust barinterval dynamically from script

Postby TJ » 11 Mar 2012

wall richard wrote:Thank you TJ. Very helpful for PF simulations.

I've narrowed my search down to an indicator controlled range bar based on hidden tick data. (I suspect MC and TS bar charts are generated from large tick data arrays.) The indicator will dynamically set the range for each succeeding bar. PlotPaintbar will "draw" each bar's OHLC.

I have encountered a couple of problems. PlotPaintBar in 5.5 Users Guide is less than helpful and new MCWiki PlotPaintBar is only a copy of 5.5. Likewise TS PlotPaintBar.

Here's my question. If I plot a paintbar with a given range and the range is exceeded the paintbar should be complete. The next bar may have a different range and the process begins anew. My question is how do I proceed to the next bar after completion of the previous bar? Does MC do this automatically or do I need to code for starting a new paintbar?

Thanks,

Rick


Computers are dumb.
It does what you tell it to do, no more, no less.
If you want a bar painted, use the PLOT keyword, bar-by-bar, EVERY bar, until you don't want it painted anymore.


I would suggest you to give EL Essential Programmers Guide another read. You have great ideas, but there are no short cuts.
These users thanked the author TJ for the post (total 2):
bowlesj3arjfca

bowlesj3
Posts: 1978
Joined: 21 Jul 2007
Has thanked: 155 times
Been thanked: 395 times

Re: adjust barinterval dynamically from script

Postby bowlesj3 » 11 Mar 2012

I would suggest you to give EL Essential Programmers Guide another read.


I second this. In fact I suggest a yearly read (if you can swing it time wise) since it will refresh ones memory to help with all those new ideas that have been created in ones mind over the year. I did that with the EL collections and the second time round I was able to make great use of those commands where as the first time trough it was just too over my head (too much new stuff coming in too fast and not enough time to sit down and really analyse it to fully understand it). Put it in your reminders to get back to the manual when you have some relaxed reading time on your hands.

Hay TJ, when are you going to get that thanks button fixed. You should be well over 1000 by now :-) Actually I just noticed you got the thanks but I still got the error. That is progress.


Return to “MultiCharts”