Need your help in multitimeframe

#31
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).

Hey Trash,
thanks

as you said :
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).

you have to iterate visible chart area meaning bar looping?


Code:
SetOption("NoDefaultColumns", True );

[COLOR="DarkOrange"]Plot(C, "",colorLightGrey, styleCandle) //For seeing chart
[/COLOR]
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= (ABS(O - C ) <= ((H - L ) * 0.1))

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


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


        addRow(bar );

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

}

[COLOR="DarkOrange"]for(b=0; b<BarCount;, b++)
{
 if(up[b] == True) PlotText(":",b + WriteVal(up),colorAqua, bkcolor =colorDefault);
}
[/COLOR]
PlotShapes(up*shapeSmallCircle,colorGreen,0,Low,-20);
I've added loop, but it is showing wrong?
i use i for timeframe
b for bars
I've used plottext because want it under candlestick.

regards
 
Last edited:
#32
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).
Hey Trash,
thanks

as you said :
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).

you have to iterate visible chart area meaning bar looping?


Code:
SetOption("NoDefaultColumns", True );

[COLOR="DarkOrange"]Plot(C, "",colorLightGrey, styleCandle) //For seeing chart
[/COLOR]
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= (ABS(O - C ) <= ((H - L ) * 0.1))

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


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


        addRow(bar );

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

}

[COLOR="DarkOrange"]for(b=0; b<BarCount;, b++)
{
 if(up[b] == True) PlotText(":",b + WriteVal(up),colorAqua, bkcolor =colorDefault);
}
[/COLOR]
PlotShapes(up*shapeSmallCircle,colorGreen,0,Low,-20);
I've added loop, but it is showing wrong?
i use i for timeframe
b for bars
I've used plottext because want it under candlestick.

regards
Hello,
What do i need to change in this?
What should be correct line of plottext?

regards
 

cheap

Active Member
#33
Hello,
What do i need to change in this?
What should be correct line of plottext?

regards
Code:
_SECTION_BEGIN("exprimenting");
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=    up= (ABS(O - C ) <= ((H - L ) * 0.1))
; 

   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);

}
Distance = 1.5 * ATR(100); 

for(b=0; b<BarCount;, b++)
{
 if(up[b] == True)PlotText(":1" + up[b], b, L[b] -Distance[b], colorAqua);
}

PlotShapes(up[i]*shapeSmallCircle,colorGreen,0,Low,-20);

Plot(C, "",colorLightGrey, styleCandle); //For seeing chart
_SECTION_END();
Ops, but it's not showing array, only fixed value that's used. concept is bit tricky.
your mean as soon candle is completed on other tf, it shows there under candle?

you'll have to use small font. PlotTextSetFont with this.

b, L -Distance = it can't be , why? because b looping through bars.. and it gives distance from bar and then only Plottext gives output .. i guess plottext doesn't show text when it's quite near.

I am just wondering, think about if you get 5 values ,ofc it looks messy, no problem.. doesn't it show you "Array subscript problem" out of range?
and you will be needed OSAKA plugin??
 
Last edited:
#34
Hey Trash,
thanks

as you said :
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).

you have to iterate visible chart area meaning bar looping?


Code:
SetOption("NoDefaultColumns", True );

[COLOR="DarkOrange"]Plot(C, "",colorLightGrey, styleCandle) //For seeing chart
[/COLOR]
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= (ABS(O - C ) <= ((H - L ) * 0.1))

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


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


        addRow(bar );

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

}

[COLOR="DarkOrange"]for(b=0; b<BarCount;, b++)
{
 if(up[b] == True) PlotText(":",b + WriteVal(up),colorAqua, bkcolor =colorDefault);
}
[/COLOR]
PlotShapes(up*shapeSmallCircle,colorGreen,0,Low,-20);
I've added loop, but it is showing wrong?
i use i for timeframe
b for bars
I've used plottext because want it under candlestick.

regards
Hello,
What do i need to change in this?
What should be correct line of plottext?

regards
Code:
_SECTION_BEGIN("exprimenting");
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=    up= (ABS(O - C ) <= ((H - L ) * 0.1))
; 

   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);

}
Distance = 1.5 * ATR(100); 

for(b=0; b<BarCount;, b++)
{
 if(up[b] == True)PlotText(":1" + up[b], b, L[b] -Distance[b], colorAqua);
}

PlotShapes(up[i]*shapeSmallCircle,colorGreen,0,Low,-20);

Plot(C, "",colorLightGrey, styleCandle); //For seeing chart
_SECTION_END();
Yes, dots are showing, i can see text, it's not getting any value ...but it's not right/
Hey Trash,
I want to know, how to do it?

regards
 
#35
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).
Hey Trash,
For output via Gfx or output of text (via GfxTextOut, GfxDrawText, PlotText, PlotTextSetFont) on



.

i CAN'T FIND HOW TO USE IT AFTER reading manual.


-
events like trade signals etc. you have to iterate visible chart area

for(b=0; b<BarCount;, b++)
{
if(up == True)PlotText(":1" + up, b, L -Distance, colorAqua);
}

PlotShapes(up*shapeSmallCircle,colorGreen,0,Low,-20);


Isn't it looping in visible area?

If using barloops is not iterating chart area? can i know what is it to mean
iterating visible chart area.
Yes in my case it's under candlestick. May i know? any link?
Kindly can you correct my plottext function?
if(up == True)PlotText(":1" + up, b, L -Distance, colorAqua);
 

cheap

Active Member
#36
id*5
While I was searching for my problem, I've gone through lot of afls.
Kindly see these design.. maybe you don't want any of that, because you want under candlestick nothing wrong ..









If you need any of such ones, it's already available. Your concept problem is not available though.


It wasn't my intention to hide your code by posting long post, I am posting to let you know such stuff.
 

cheap

Active Member
#37
mtftrader,
Did you get solved your problem?
especially kindly look at it:


Kindly look at my thread, someone saying good things about you.
 

cheap

Active Member
#39
Hey,
May i know what is it called?
afl name? Yes below candle, but can you tell me about upper picture.
wait, let me see it .
regards
NMA MTF ,i saw it on internet, you want code?
very few mtf system on internet, not much code. Not traditional i'm talking about.
 
#40
NMA MTF ,i saw it on internet, you want code?
very few mtf system on internet, not much code. Not traditional i'm talking about.
cool, i got it's mr. karthick ?

Yes, that problem I'm still solving, Number is not getting placed, my meaning numbers are moving with candles. it should be at right place , when it's first originated

like,
if 5 on 5candles .. it's also moving with when price candle is for example i.e. current cnadle...
it has to be there at first place, and if new value it should be at right place..


picture:


regards