Need your help in multitimeframe

#21
YOUR picture was showing three bullish 30min candles. And you posted Bar30 AND Bar60 yourself the whole time!

If you want independent 30min then remove "Bar30 =" and "Bar30 AND".
Is that really that difficult?




What two timeframes? The first code is dependent on hourly TF so far.

If you want to plot the code for 30 minute and 60 minute chart then make condition based on Interval().

Code:
/// @link http://www.traderji.com/software/101822-need-your-help-multitimeframe-2.html#post1157240

Plot( C, "", colorDefault, styleCandle ); // Just to show on pane

if( Interval() < 3600 ) {
    TimeframeSet( inHourly );
    Bar60 = C > O;
    TimeframeRestore(); 

    expandmode = expandPoint;
    Bar60 = Ref( TimeFrameExpand( Bar60, inHourly, expandmode ), -1);     
} else
    Bar60 = C>O;

PlotShapes( IIF( Bar60, shapeUpArrow , shapeNone ), colorAqua );

_N( Title = StrFormat( "{{NAME}} - {{INTERVAL}} - {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%), Vol %g {{VALUES}}",
                           O, H, L, C, SelectedValue( ROC( C, 1 ) ), V ) );
As for difference between expandpoint and expandfirst read here
http://amibrokerforum.proboards.com/thread/155/time-frame-functions
Hi Trash,
Yes, i will try it .
2. I was asking ,
Can we compare 3 or more timeframe with expandPoint?
for right now, it's 2 timeframe.
In same way, can we compare more than 2 timeframes?

If comparing more than 2 timeframe, do i need to use TimeFrameGetPrice?
or it's not needed?
we used expandPoint when compared 2 timeframe.

regards
 
Last edited:
#23
Hi,
May i know ,can we do everything on charts that we can do in exploration?
my meaning, don't wantsto see table just directly output it under candlestick?

For oscillator indicators, it's possible, when you make any signal on oscillator you can plot it on candlestick. and Exploration only making table of Buy Sell , but you can get arrow without using Exploration?





as soon in other time tf some pattern made, without exploration can you put this under candlestick? in real time. as soon pattern made, it put tere. yes i do understand calculation working, going through ..
Addrow is used for see table in right column. HEre we don't use it or ?
Is there any function for this task. different than function we already used ?
regards
 
Last edited:
#24
You may use/do whatever you require.

PS: I have technically modified code of previous page slightly.
Hey Trash, I tried it, it worked thanks.
May i know , Is it possible?


Hi,
May i know ,can we do everything on charts that we can do in exploration?
my meaning, don't wantsto see table just directly output it under candlestick?

For oscillator indicators, it's possible, when you make any signal on oscillator you can plot it on candlestick. and Exploration only making table of Buy Sell , but you can get arrow without using Exploration?





as soon in other time tf some pattern made, without exploration can you put this under candlestick? in real time. as soon pattern made, it put tere. yes i do understand calculation working, going through ..
Addrow is used for see table in right column. HEre we don't use it or ?
Is there any function for this task. different than function we already used ?
regards
i.e.
Code:
SetOption("NoDefaultColumns", True ); 

AddColumn( Null, "Symbol", 1, colorDefault, colorDefault, 70 );
AddColumn( Null, "DateTime", 1, colorDefault, colorDefault, 150 );
AddColumn( Null, "bar", 1, colorDefault, colorDefault, 70 );



dt = DateTime(); 
 filter = 0;

for(i=1; i<=10; i++) { 

   TimeframeSet(i * in1Minute);
   
   up= C>O; 

   bar= Name() + "\t";
   bar= bar+ DateTimeToStr(LastValue(DateTime()))+ "\t"; 
 

   x= StrFormat("%02g-min", i);
   bar = bar+ WriteIf(up,  x, "\t");

  
        addRow(bar );
    
  TimeframeRestore();  
m1 = TimeFrameExpand(up,in1Minute);

}
we want to put it as per this picture


values under candlestick .. but not like all values on fix place.. as candlestick moves .. under them .c as per written there
 
Last edited:

cheap

Active Member
#25
Hey,

r = variable after looping like i.e. in your example it's Up

PlotShapes(r*shapeSmallCircle,colorRed,Layer=0,yposition=H,Offset=12);
//this one plot dot something under candle .

for(i=0;i<BarCount-1;i++)
//looping through bars
{
if(r==True)PlotText("xyzi", i, H, colorRed, bkcolor = colorDefault);
//If there is Up then it will Write ,xyz whateveryou want to write it.
}

But I do believe , your question is not like that..
you need to output through a variable ouput ,which is not fixed..
In your fix is two things :
1. color of dot if it's buy condition .
2. no only one thing is fixed, How will you write it first.. you need output
of tf timeframe here ? we don't know , what will it gonna be ..
So I do believe , PlotText not gonna work ..

psedo:

IF UPBAR IS FORMED IN X TIMEFRAME.. TAKE THAT X TIMEFRAME VALUE (sounds like array) TO UNDER CANDLE BAR..AND WRITE THOSE VALUES UNDER CANDLESTICK ..

right now got no idea.
I fed up with my problem, not enough example about looping with timeframe function playing with timeframe .. and not enough example of those modes .. so i fed up with my problem ..

got no mind right now to think about it..

but Yes, values that you put UNDER CANDLESTICK .. IT CAN'T BE FIXED..
IT WILL BE A ARRAY ..NOT DEFINED BEFORE..

CAN YOU DO IT WITHOUT EXPLORATION? AUTOMATICALLY ON CHART ?

I'VE SEEN MTF DASHBOARD, YOU ALSO KNOW THAT, WHATEVER COMES THEY PUT ON PANE UNDER CHART OR ON CHART.. BUT YOU WANT LIKE ARROW , WHENEVER IT OCCUR THAT TIME, PUT IT BELOW ARROW.. AND ARROW CHANGE CANDLE BY CANDLE ... SO ......

JUST WONDER , HOW DO YOU PLOT THOSE VALUES UNDER DOT OR ARROW? SEE
AMIBROKER GOT plot, plotGrid,PlotOHLC, plotshapes, plottext, plottextsetfont, other two for volume..

TELL ME HOW WOULD YOU DO IT? THEY HAVE NO FUNCTION FOR THIS?
PLOTTEXT ,AND SUCH FUNCTION IS FOR A FIXED VALUE ALREADY DEFINED.. WHEN THEY NEED TO PUT IT THERE...


wait
Plot( array, name, color/barcolor, style = styleLine, minvalue = {empty}, maxvalue = {empty}, XShift = 0, Zorder = 0, width = 1 )

there's Plot , it allows array .. might be possible. but it doesn't plot under arrow..so i don't think so.

How about this? PlotText("fix " + WriteVal(array,fraction), again i don't know.
 
Last edited:

trash

Well-Known Member
#26
Hey Trash, I tried it, it worked thanks.
May i know , Is it possible?




i.e.

we want to put it as per this picture

values under candlestick .. but not like all values on fix place.. as candlestick moves .. under them .c as per written there
You can plot any circle or any other graphic (incl. any text) you like below or up of a bar or anywhere.

Also plotting those ones is not dependent on exploration. You don't require exploration for plotting dots or text! Exploration is just another output option.

As for plotting custom shapes.
You have option to use Plotshapes() (no loop required).




But you also have option to plot custom circles (or any other graphic) using Gfx

Or you may use UniCodes/UCN (since AB version 5.94)
http://www.amibroker.com/devlog/wp-content/uploads/2015/03/readme5940.html

Google for unicodes. There are literally endless ones.
Then you can use any ready to use codes to plot i.e. hearts, umbrellas, phones, up hand, down hand, circles, dots, stars, snowflakes, ... etc. etc.

For output via Gfx or output of text (via GfxTextOut, GfxDrawText, PlotText, PlotTextSetFont) on events like trade signals etc. you have to iterate visible chart area (-> using loop).



 
Last edited:
#27
You can plot any circle or any other graphic (incl. any text) you like below or up of a bar or anywhere.

Also plotting those ones is not dependent on exploration. You don't require exploration for plotting dots or text! Exploration is just another output option.

As for plotting custom shapes.
You have option to use Plotshapes() (no loop required).

Hey Trash,
, Thank you
but I was asking about exploration values under that dot or arrow.
which values?
values that we get after doing exploration usually?

Code:
SetOption("NoDefaultColumns", True ); 

AddColumn( Null, "Symbol", 1, colorDefault, colorDefault, 70 );
AddColumn( Null, "DateTime", 1, colorDefault, colorDefault, 150 );
AddColumn( Null, "bar", 1, colorDefault, colorDefault, 70 );



dt = DateTime(); 
 filter = 0;

for(i=1; i<=10; i++) { 

   TimeframeSet(i * in1Minute);
   
   up= C>O; 

   bar= Name() + "\t";
   bar= bar+ DateTimeToStr(LastValue(DateTime()))+ "\t"; 
 

   x= StrFormat("%02g-min", i);
   bar = bar+ WriteIf(up,  x, "\t");

  
        addRow(bar );
    
  TimeframeRestore();  
m1 = TimeFrameExpand(up,in1Minute);

}
1.
If we use above code in exploration , for example we get 5,7,8 of Upbar.
what i want is Put those 5,7,8 Under candlestick.

like on picture, xyz should be 5,7,8

2.
Kindly imagine, if we are not doing_exploration that upper code, but there is always some pattern in forming at some point of time.
How we get it?
we get it after doing exploration..
can we directly put those values on chart? as soon it formed? we only know after pressing exploration button on analysis, can we know it as soon it formed...?

Is it possible in amibroker?
 
Last edited:

trash

Well-Known Member
#28
Once again, you don't require exploration to output same info on chart!!

i.e. bar completion is an event being independent from exploration or plot.
So the actual event is bar completion but not executing exploration.
 
Last edited:
#29
Once again, you don't require exploration to output same info on chart!!

i.e. bar completion is an event being independent from exploration or plot.
So the actual event is bar completion but not executing exploration.
So
1.
If we use above code in exploration , for example we get 5,7,8 of Upbar.
what i want is Put those 5,7,8 Under candlestick.
like on picture, xyz should be 5,7,8
So answer of this question is Yes. you're saying that xyz which is tf timeframe not price of buy value. xyz is not buy price,it's tf
Plottext() doesn't allow array , so how will you get it? or it will be needed other function?
Are you sure answer is yes? i mean i was asking about output of dynamic array , i think we getting 24 tf upbar, it's dynamic array and it's not predefined.
what function do we use here?



2.
Kindly imagine, if we are not doing_exploration that upper code, but there is always some pattern in forming at some point of time.
How we get it?
we get it after doing exploration..
can we directly put those values on chart? as soon it formed? we only know after pressing exploration button on analysis, can we know it as soon it formed...?

Is it possible in amibroker?

So there is upbar at tf of 24 . i'm seeing 1 minute chart.I don't need to do exploration to find out there's upbar of 24 m. ?
What function do i need here ? if it's possible?
thank you
 
Last edited:

trash

Well-Known Member
#30
Are you and cheap one and the same guy?



xyz is not buy price,it's tf Plottext() doesn't allow array , so how will you get it? or it will be needed other function?
Are you sure answer is yes?
I have already told you how to plot text on events in upper posting!!


So there is upbar at tf of 24 . i'm seeing 1 minute chart.I don't need to do exploration to find out there's upbar of 24 m. ?
What function do i need here ? if it's possible?
thank you
NO, you don't need exploration to find out! How many times do you want me to write that?