Simple Coding Help - No Promise.

I have an AFL for vwap as under
_SECTION_BEGIN("VWAP");
/*
The VWAP for a stock is calculated by adding the dollars traded for every
transaction in that stock ("price" x "number of
shares traded") and dividing the total shares traded. A VWAP is computed
from the Open of the market to the market Close, AND is
calculated by Volume weighting all transactions during this time period
*/

Bars_so_far_today = 1 + BarsSince( Day() != Ref(Day(), -1));
StartBar = ValueWhen(TimeNum() == 091500, BarIndex());
TodayVolume = Sum(V,Bars_so_far_today);
IIf (BarIndex() >= StartBar, VWAP = Sum (C * V, Bars_so_far_today ) /
TodayVolume,0);



Plot (VWAP,"VWAP",colorOrange, styleThick);


_SECTION_END();

I just need to add dotted lines of any colour for closing Vwap of previous 3 days. I will be grateful if anybody can add
any help if possible..
 
Dear Happy ji
Do you pl. help me in inserting buy/sell arrows with scanning in the above said afl of Heiken ashi?
Thanks & regards
Hi hmp,
I have this Heiken ashi afl with buy/sell arrows collected from traderji only. Not sure scanning will work or not.

PHP:
_SECTION_BEGIN("Heiken Ashi Smoothed");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),ParamColor("BgBottom", colorBlack),ParamColor("Titleblock",colorLightGrey ));
SetChartOptions(0,chartShowArrows|chartShowDates);
GraphXSpace=5;
p=Param("Period",30,0,30,1);
Om=MA(O,p);
hm=MA(H,p);
lm=MA(L,p);
Cm=MA(C,p);
HACLOSE=(Om+Hm+Lm+Cm)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( Hm, Max( HaClose, HaOpen ) );
HaLow = Min( Lm, Min( HaClose, HaOpen ) );
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "" + Name(), colorWhite, styleCandle | styleNoLabel );


a=8;
slope = Param("slope",2,2,100,1);
Color20= IIf(LinRegSlope(MA(HaClose,a),slope)<0,colorRed,colorGreen);

Plot(MA(HaClose,a),"", color20,styleThick);

Color=IIf(Haclose>MA(HaClose,a),colorGreen, colorRed);
_SECTION_END();


Buy=Color==colorGreen;
Sell=Color==colorRed;

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

PlotShapes(IIf(Buy , shapeUpArrow, shapeNone),colorGreen); 
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed);
 
Last edited:

hmp

Well-Known Member
Yes Dear Crude Begginar
It works perfectly fine even scanning also!
Thanks a lot for that.Let me tell you how am i going to use it.I will use 30 Min. time frame for buy/ sell.If its a buy then i will only execute buy signals in 5 min. time frame. Trailing stoploss is inbuilt in this system. This is for intraday.
For positional I will use daily time frame. I will maintain my position till it hits stoploss. Overall its all in one system.
Pl. let me know from experts if they have any effective method in their mind.
Regards.
 
Last edited:
Yes Dear Crude Begginar
It works perfectly fine even scanning also!
Thanks a lot for that.Let me tell you how am i going to use it.I will use 30 Min. time frame for buy/ sell.If its a buy then i will only execute buy signals in 5 min. time frame. Trailing stoploss is inbuilt in this system. This is for intraday.
For positional I will use daily time frame. I will maintain my position till it hits stoploss. Overall its all in one system.
Pl. let me know from experts if they have any effective method in their mind.
Regards.
hmp,
your traderji id seems to be created very recently :clap::clap:. 13+ ..I am happy you got what you are looking for :thumb:. Nice idea ..its always better to be on major trend side. which stop you follow during the day is it 5 min or 30 min.

most happening thread these days is "The Best Trading System". you may fine tune your method as well :clapping::clapping:
 
I am looking for AFL for Multi Time Frame CCI.

Kindly help.

Thanks.
Code:
_SECTION_BEGIN("CCI");
periods = Param( "Periods", 14, 2, 200, 1 );
Plot( CCI( periods ), _DEFAULT_NAME(), ParamColor( "Color",  colorCycle ), ParamStyle("Style")  );
_SECTION_END();

_SECTION_BEGIN("HTF CCI");
HTF = in1Minute * Param( "TF MINUTES", 60, 2, 24*60,1);
TimeFrameSet(HTF);
	CC = CCI(14);
TimeFrameRestore();
HTFCCI = TimeFrameExpand(Cc,HTF);
Plot(HTFCCI, "HTFCCI", ParamColor( "Color1",  colorCycle ), ParamStyle("Style1")  );
_SECTION_END();
Use parameter to set the intraday HTF

for daily/ weekly can use

Code:
_SECTION_BEGIN("DAILY CCI");
TimeFrameSet(inDaily);
	CC = CCI(14);
TimeFrameRestore();
DAYCCI = TimeFrameExpand(Cc,inDaily);
Plot(DAYCCI, "DAYCCI", ParamColor( "Color2",  colorCycle ), ParamStyle("Style2")  );
_SECTION_END();

_SECTION_BEGIN("WEEK CCI");
TimeFrameSet(inWeekly);
	CC = CCI(14);
TimeFrameRestore();
WEEKCCI = TimeFrameExpand(Cc,inWeekly);
Plot(WEEKCCI, "WEEKCCI", ParamColor( "Color3",  colorCycle ), ParamStyle("Style3")  );
_SECTION_END();

Happy :)
 
Hi

Please point out exactly which one you are referring to

Thanks'

Happy :)
Is it possible to decode it like in this screen shot. Red and green lines are bands based on keltner channel of TEMA high and TEMA low.



2 afls
1) Keltner bands along with OBV
2) Keltner band along with price action

Thanks a lot in advance HAPPY :clapping::clapping:
 
Last edited:

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?