Request for Developing a Dashboard AFL to display info on screen

pkgmtnl

Well-Known Member
#1
Dear Learned Coders,
I want to develop an AFL for constantly displaying the following info on Screen, when the chart is viewed on 1min timeframe:-

1) On 5Minute TF:-
- Current Candle is BULLISH/ BEARISH & Previous Candle was BULLISH/ BEARISH.

2) On 10Minute TF:-
- Current Candle is BULLISH/ BEARISH & Previous Candle was BULLISH/ BEARISH.

3) On 15Minute TF:-
- Current Candle is BULLISH/ BEARISH & Previous Candle was BULLISH/ BEARISH.

4) On 20Minute TF:-
- Current Candle is BULLISH/ BEARISH & Previous Candle was BULLISH/ BEARISH.

5) On 30Minute TF:-
- Current Candle is BULLISH/ BEARISH & Previous Candle was BULLISH/ BEARISH.

5) On 60Minute TF:-
- Current Candle is BULLISH/ BEARISH & Previous Candle was BULLISH/ BEARISH.

Can it be coded?? This info can be reproduced in any way.
 

pkgmtnl

Well-Known Member
#3
Hi, Some1 developed it for me, I thought I should share it here:-

Drop on blank screen:-

_SECTION_BEGIN("CANDLE COLOUR ON DIFFERENT TIMEFRAME");
TimeFrameSet(in1Minute*3);
locationW = Param("locationW",700,1,1200,1,1);
locationH = 30;
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut(" 3min CANDLE", locationW, locationH);
locationW = locationW + 120;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+25;
RestorePriceArrays();

/******* REPEAT THIS SECTION AS MUCH ****/
TimeFrameSet(in5Minute);
locationW = Param("locationW",700,1,1200,1,1);
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("5 MIN CANDLE", locationW, locationH);
locationW = locationW + 120;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+30;
RestorePriceArrays();

/******* REPEAT THIS SECTION AS MUCH ****/
TimeFrameSet(in1Minute*10);
locationW = Param("locationW",700,1,1200,1,1);
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("10 MIN CANDLE", locationW, locationH);
locationW = locationW + 120;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+35;
RestorePriceArrays();

/******* REPEAT THIS SECTION AS MUCH ****/
TimeFrameSet(in15Minute);
locationW = Param("locationW",700,1,1200,1,1);
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("15 MIN CANDLE", locationW, locationH);
locationW = locationW + 120;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+40;
RestorePriceArrays();

/******* REPEAT THIS SECTION AS MUCH ****/
TimeFrameSet(in15Minute*2);
locationW = Param("locationW",700,1,1200,1,1);
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("30 MIN CANDLE", locationW, locationH);
locationW = locationW + 120;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+45;
RestorePriceArrays();

/******* REPEAT THIS SECTION AS MUCH ****/
TimeFrameSet(in15Minute*3);
locationW = Param("locationW",700,1,1200,1,1);
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("45 MIN CANDLE", locationW, locationH);
locationW = locationW + 120;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+50;
RestorePriceArrays();

/******* REPEAT THIS SECTION AS MUCH ****/
TimeFrameSet(in15Minute*4);
locationW = Param("locationW",700,1,1200,1,1);
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("15 MIN CANDLE", locationW, locationH);
locationW = locationW + 120;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+55;
RestorePriceArrays();




TimeFrameSet(inHourly);
locationW = Param("locationW",700,1,1200,1,1);
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("60 MIN CANDLE", locationW, locationH);
locationW = locationW + 120;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+60;
RestorePriceArrays();
_SECTION_END();
 

pkgmtnl

Well-Known Member
#4
same codes , but can shift on chart:

_SECTION_BEGIN("MTF_POLES");

NO = Param("TF",1,1,10,1);
hs = Param("H-shift",-600,-1080,530,20);

locationW = 1100+hs;
locationH = 0;
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("Chart Time Multiplier", locationW, locationH);

locationW = 1100+hs;
locationH = -30;
TimeFrameSet(in1Minute * NO);
locationW = 1100+hs;
locationH = 30;
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut(" 1x MIN CANDLE", locationW, locationH);
locationW = locationW + 140;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+25;
RestorePriceArrays();

/******* REPEAT THIS SECTION AS MUCH ****/
TimeFrameSet(in1Minute * 3);
locationW = 1100+hs;
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("3x MIN CANDLE", locationW, locationH);
locationW = locationW + 140;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+25;
RestorePriceArrays();


TimeFrameSet(in1Minute * 5);
locationW = 1100+hs;
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("5x MIN CANDLE", locationW, locationH);
locationW = locationW + 140;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+25;
RestorePriceArrays();

TimeFrameSet(in1Minute * 15);
locationW = 1100+hs;
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("15x MIN CANDLE", locationW, locationH);
locationW = locationW + 140;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+25;
RestorePriceArrays();

TimeFrameSet(in1Minute * 30);
locationW = 1100+hs;
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("30x MIN CANDLE", locationW, locationH);
locationW = locationW + 140;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+25;
RestorePriceArrays();

TimeFrameSet(in1Minute * 45);
locationW = 1100+hs;
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("45x MIN CANDLE", locationW, locationH);
locationW = locationW + 140;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+25;
RestorePriceArrays();

TimeFrameSet(in1Minute * 60);
locationW = 1100+hs;
GfxSelectFont("Tahoma", 12);
GfxSetBkColor(colorBlack); GfxSetTextColor(colorWhite);
GfxTextOut("60x MIN CANDLE", locationW, locationH);
locationW = locationW + 140;
if (C[BarCount-2] >O[BarCount-2] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(Ref(C,-1)>Ref(O,-1) ,"PG","PR"), locationW, locationH );
locationW = locationW + 30;
if (C[BarCount-1] >O[BarCount-1] ) GfxSetBkColor( colorGreen); else GfxSetBkColor(colorRed);
GfxTextOut( WriteIf(C>O ,"CG","CR"), locationW, locationH);
locationH = locationH+25;
RestorePriceArrays();

_SECTION_END();
 

Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Name:Phone:
Email:City:
State:
Are you a day trader?