PureBytes Links
Trading Reference Links
|
Perfect
--- In amibroker@xxxxxxxxxxxxxxx, "jtoth100" <jtoth100@xxx> wrote:
>
> Hi,
>
> There is no way to add to OHLC. But there is solution to this.
>
> check this:
>
> //Shifting arrays
> futOpen = Ref(Open, 2);
> futClose = Ref(Close, 2);
> futHigh = Ref(High, 2);
> futLow = Ref(Low, 2);
>
> //calculate new bars
> futOpen[BarCount-2] = futOpen[BarCount-3];
> futClose[BarCount-2] = futClose[BarCount-3];
> futHigh[BarCount-2] = futHigh[BarCount-3]*1.02;
> futLow[BarCount-2] = futLow[BarCount-3]*0.99;
>
> futOpen[BarCount-1] = futOpen[BarCount-2];
> futClose[BarCount-1] = futClose[BarCount-2];
> futHigh[BarCount-1] = futHigh[BarCount-2]*1.01;
> futLow[BarCount-1] = futLow[BarCount-2]*0.99;
>
>
> //plot is shifted !!! use xshift param if you need to plot it correctly
> PlotOHLC(futOpen, futHigh, futLow, futClose, "", colorBlack);
>
> //calc indicator on calulated values is is shifeted as well!!!
> MyMA = MA(futClose, 10);
> Plot(MyMa, "", colorBlue, styleLine);
>
> Y
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|