Simple Coding Help - No Promise.

Hmmmm.... Source of Confusion is your inappropriate usage of term back-testing.

Anyways, there is a tool called "Cycle Lines" in Amibroker which can do what you want. Its bitmap image has three parallel vertical lines with one dashed horizontal line cutting it. You can use this tool to place repeating vertical lines on screen at preset intervals.

Drag and drop the tool and then double-click it to manually do the settings.

Some tips on doing the manual settings: Keep value of Start Y and End Y same. Manually enter start time as 9:30 AM and end time as 10:00 AM.

Extra tip: Keep color extremely faint

Good idea

for code to draw vertical lines every 30 minutes on lower time frame chart

Code:
Plot((floor(((TimeNum()%10000)/100)-0.01)==29),"",colorDarkGrey,styleOwnScale|styleNoLabel|styleHistogram,0,1);
Happy :)
 
Good idea

for code to draw vertical lines every 30 minutes on lower time frame chart

Code:
Plot((floor(((TimeNum()%10000)/100)-0.01)==29),"",colorDarkGrey,styleOwnScale|styleNoLabel|styleHistogram,0,1);
Happy :)
Happyji.

The plot statement as posted by you will plot lines after every hour like 10:30, 11:30 and so on. To be able to plot at 10:00, 11:00 etc, you will need to compare with 0 (or maybe 59).

If you want to do that in one plot statement only, then you will need to change the insides of your floor(...).

In case you are Happy with two plot statements, here is second one...
Code:
Plot((floor(((TimeNum()%10000)/100)-0.01)==00),"",colorDarkGrey,styleOwnScale|styleNoLabel|styleHistogram,0,1);
 
Last edited:
Hello MM

Yes the code will plot one line every hour

One thing to be noticed is that many times by the time solution or hints are provided
the trader asking the original question have already moved onto something else :D

Cheers :thumb:

Happy :)
 
any afl to show pc time on charts , in big fonts??
Code:
GfxSelectFont("Arial", 40);
RequestTimedRefresh(1, true);
GfxTextOut(Now(0), 100,200);
 
Hello,
I have two questions.

1.
Code:
Plot( C, "Price", colorDefault, styleCandle );
DayH = TimeFrameGetPrice("H", inHourly, 0);  
Plot(DayH,"",colorAqua,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
it draw intraday hourly high..
problem is .. if you are watching 10 min. chart.. 6candle will be there..
it will move with 6 candles as soon it's completed then it's get fixed..
I don't want to see it's moving with candles..i want line there when candle get hourly high, it just plot it .. not move with candle..


2. maybe it will be unnecessary to ask if first query is solved.. if needed, might ask later
 
Hello,
I have two questions.

1.
it draw intraday hourly high..
problem is .. if you are watching 10 min. chart.. 6candle will be there..
it will move with 6 candles as soon it's completed then it's get fixed..
I don't want to see it's moving with candles..i want line there when candle get hourly high, it just plot it .. not move with candle..


2. maybe it will be unnecessary to ask if first query is solved.. if needed, might ask later
Code:
Plot( C, "Price", colorDefault, styleCandle );
DayH = TimeFrameGetPrice("H", inHourly, -1);  
Plot(DayH,"",colorAqua,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
 
Code:
Plot( C, "Price", colorDefault, styleCandle );
DayH = TimeFrameGetPrice("H", inHourly, -1);  
Plot(DayH,"",colorAqua,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Thanks,
silly me, i was thinking it could be possible in current, if we hide line then it will like after 6 bars, nothing appearing.and then accidentally it get appeared, same like high low swings ..


We can plot O,h,l,c each of that with timeframegetprice()


How can we put line on Close of Candlestick..
If
(C > O) = bullcandle
How to draw horizontal line on close on bullish candlestick..
How do we do it ?
Code:
Plot( C, "Price", colorDefault, styleCandle );
bullcandle = C > O;
// How to draw horizontal line close of bullcandle?
DayH = TimeFrameGetPrice("H", inHourly, -1);  
Plot(DayH,"",colorAqua,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
 
Thanks,
silly me, i was thinking it could be possible in current, if we hide line then it will like after 6 bars, nothing appearing.and then accidentally it get appeared, same like high low swings ..


We can plot O,h,l,c each of that with timeframegetprice()


How can we put line on Close of Candlestick..
If
(C > O) = bullcandle
How to draw horizontal line on close on bullish candlestick..
How do we do it ?
Code:
Plot( C, "Price", colorDefault, styleCandle );
bullcandle = C > O;
// How to draw horizontal line close of bullcandle?
DayH = TimeFrameGetPrice("H", inHourly, -1);  
Plot(DayH,"",colorAqua,styleDots|styleNoLine|styleNoRescale|styleNoTitle);
Code:
Plot(SelectedValue(C), "Price2", colorDefault, stylenolabel|styleline,0,0,10);
Try reading Amibroker Help when free
loads of sample code, examples, useful coding tips given
 

Similar threads