Simple Coding Help - No Promise.

For alert, you need to use Analysis window and Explore option.

1. These two lines are not required so comment them
Plot(Close, "Close", colorWhite, styleDots);
Plot(DCEF, "NonLinear Ehlers Filter", IIf(Close>DCEF, colorBrightGreen, colorRed), styleThick);

2.
Instead of that add the this line:
Filter = Cross(Close,DCEF) OR Cross(DCEF,Close);

Do post back your results.
Hey thanks for the reply,

1) I need this line, so i can see the chart movement also, i mean the green and red lines
Plot(Close, "Close", colorWhite, styleDots);
Plot(DCEF, "NonLinear Ehlers Filter", IIf(Close>DCEF, colorBrightGreen, colorRed), styleThick);

2) Filter is giving out output of last candle change correct, but without that filter code too i was getting same result.

My query was I need an alert when the exact crossover happens, and i would adding my buy sell alert sounds to it, below mentioned.

AlertIf(Buy,"SOUND C:\\Windows\\Media\\Buy.wav","Buy@" + WriteVal( O,1.2),1);
AlertIf(Sell,"SOUND C:\\Windows\\Media\\Sell.wav","Sell@" + WriteVal( H,1.2) ,2);
 

travi

Well-Known Member
Hey thanks for the reply,

1) I need this line, so i can see the chart movement also, i mean the green and red lines
Plot(Close, "Close", colorWhite, styleDots);
Plot(DCEF, "NonLinear Ehlers Filter", IIf(Close>DCEF, colorBrightGreen, colorRed), styleThick);

2) Filter is giving out output of last candle change correct, but without that filter code too i was getting same result.

My query was I need an alert when the exact crossover happens, and i would adding my buy sell alert sounds to it, below mentioned.

AlertIf(Buy,"SOUND C:\\Windows\\Media\\Buy.wav","Buy@" + WriteVal( O,1.2),1);
AlertIf(Sell,"SOUND C:\\Windows\\Media\\Sell.wav","Sell@" + WriteVal( H,1.2) ,2);
Can you be more clear?

I thought you want to scan a list of stocks and get alert for occurrence of event.
Scan and Explore in Analysis window are very similar but they have nothing to do with chart. You can click the particular symbol and load that chart.

On the other hand if you put this code(indicator) directly in the chart window, you're talking about a completely different scenario. Then you would need that many charts as there are symbols.
so what is it that ur trying to achieve?
 

RockyRobust

Well-Known Member
Hello Friends,

Is there an AFL existing in Public Domain which can plot Fibonacci Retracement levels connecting the Previous Day High & the Previous Day Low levels. I searched but did not get the AFL. Please share if it is available with you.

Thanks.
Can some expert in coding just tell that is this condition easy to code from existing Fibonacci afls or it will be complicated.
 
hello friends,

I was wondering can we have two time frame ribbon in same chart (not divided in different panes, one above one I mean).

For example RSI or MACD ribbon for 5 mins and 15 mins one above another?

See screen shot, just for an idea. Would mean a great deal to me if some expert could help me on this.

I tried this code from the net, but it just dint work.
SetChartBkGradientFill(colorWhite,colorLightGrey,colorWhite);
Period= ParamList("Base","Monthly|Weekly|Daily|Hourly|15Minute|5Minute|1Minute",0);

if(Period=="Monthly"){
TimeFrameSet(inMonthly);


Thanks
Pavan
 

Attachments

Can you be more clear?

I thought you want to scan a list of stocks and get alert for occurrence of event.
Scan and Explore in Analysis window are very similar but they have nothing to do with chart. You can click the particular symbol and load that chart.

On the other hand if you put this code(indicator) directly in the chart window, you're talking about a completely different scenario. Then you would need that many charts as there are symbols.
so what is it that ur trying to achieve?
Thanks for your reply. Yes, I need it for running analysis only, I need alert only when change over happens from red to green or green to red, this code keeps giving alerts, donno why or how.
 

travi

Well-Known Member
Thanks for your reply. Yes, I need it for running analysis only, I need alert only when change over happens from red to green or green to red, this code keeps giving alerts, donno why or how.
1. use the Explore option.

2. comment the Plot lines

3. Add these lines instead of filter, it should work

AlertIf(Cross(Close,DCEF),"SOUND C:\\Windows\\Media\\Buy.wav","Buy@" + WriteVal( O,1.2),2); // last 2 is buy
AlertIf(Cross(DCEF,Close),"SOUND C:\\Windows\\Media\\Sell.wav","Sell@" + WriteVal( H,1.2) ,3); // last 3 is sell
 
1. use the Explore option.

2. comment the Plot lines

3. Add these lines instead of filter, it should work

AlertIf(Cross(Close,DCEF),"SOUND C:\\Windows\\Media\\Buy.wav","Buy@" + WriteVal( O,1.2),2); // last 2 is buy
AlertIf(Cross(DCEF,Close),"SOUND C:\\Windows\\Media\\Sell.wav","Sell@" + WriteVal( H,1.2) ,3); // last 3 is sell
Thank you so much...
 
As i was looking for that MACD ribbon, I found one from an old AFL, but i am just not able to add Buy/Sell scan alert for this AFL.

Can someone please tell me how do I add buy/sell signal for crossover?

Also, can someone explain what is this code doing? Does not look normal MACD ribbon code, or is there any other simpler way to get the same result?, asking this because code looks complex compared to normal MACD ribbon codes.

_SECTION_BEGIN("MTF MACD");
Fast=Param("MA1",12);
Slow=Param("MA2",26);
sig=Param("MA3",9);
TimeFrameSet( in15Minute*2);
m30= MACD(Fast,Slow);
ms30=Signal(Fast,Slow,sig);
TimeFrameRestore();
cm30=TimeFrameExpand(m30,in15Minute*2,expandFirst);
cms30=TimeFrameExpand(ms30,in15Minute*2,expandFirst);
Co30=IIf(Cm30>Cms30,colorBrightGreen,colorRed);
RibbonThickness = Param("Ribbon Thickness", 0);
procedure MultiRibbon(RibbonColor, Position, Label)
{
Plot(Position, "", RibbonColor, styleArea | styleOwnScale | styleNoLabel, 0,100);
}
MultiRibbon(co30, 14, "MACD ("+in15Minute*2/60+"-Min)");
_SECTION_END();
 

toocool

Well-Known Member
i have GFDL data , and i am facing very strange issue ................i hope anyone with any datafeed can throw light on this problem

in nifty options all strikes , when i see volume in daily charts , its fine , but when i ssee on weekly charts the volume is showing double , for example 10700 put had total volume of 13.7 crores last week as calculated with calculator for 5 days of the week ...............but same week if seen on weekly chart , it shows just double the volume as 274 million shares means 27.4 crore ...


i am told by GFDL that its amibroker problem ......................can u guys please confirm from your side , please

regards
 

josh1

Well-Known Member
This AFL gives me Initial Range High Low and also a crooked line at the EOD. I want to remove that Crooked line.

Code:
_SECTION_BEGIN("Initial Range HI-LO");

IRHL = ParamToggle("InitialRange HI LO","Show|Hide",1);

DayC = TimeFrameGetPrice("C", inDaily, -1);  DayCI = LastValue (DayC,1);    // yesterdays close
DayO = TimeFrameGetPrice("O", inDaily);      DayOI = LastValue (DayO,1);   // current day open

beginTradeTime = ParamTime("Strt Time ", "9:15:00");
endRangeTime    = ParamTime("Range Time","9:30:00");

DaysBack = 0;

IRHigh = Max(deTimeRangeHHV(H,beginTradeTime ,endRangeTime ),deTimeRangeHHV(H,beginTradeTime ,endRangeTime ));
IRLow = Min(deTimeRangeLLV(L,beginTradeTime ,endRangeTime),deTimeRangeLLV(L,beginTradeTime ,endRangeTime ));

RGH = ValueWhen(deFlagLastBarOfDay(endRangeTime ),IRHigh ,DaysBack);
RGL = ValueWhen(deFlagLastBarOfDay(endRangeTime ), IRLow ,DaysBack);


RH = IRHigh;  RHI = LastValue (DH,1);// 15 Min high
RL = IRLow;  RLI = LastValue (DL,1);    // 15 Min low
 
Today = LastValue(Day());
 
numbars = LastValue(Cum(Status("barvisible")));
Hts  = -33.5;
Today = LastValue(DaysSince1900());


if(IRHL==1) {

//    Plot(IIf(Today==DaysSince1900(),RL,Null),"RL",RGClrs,styleLine|styleThick|styleNoRescale|styleNoTitle|styleNoLabel,0,0,0,BarLayer+1);
//    Plot(IIf(Today==DaysSince1900(),RH,Null),"RH",RGClrs,styleLine|styleThick|styleNoRescale|styleNoTitle|styleNoLabel,0,0,0,BarLayer+1);
//    Plot(IIf(Today==Day(),RGL,Null),"RL",RGClrs,styleLine|styleThick|styleNoRescale|styleNoTitle|styleNoLabel,0,0,0,BarLayer+1);
//    Plot(IIf(Today==Day(),RGH,Null),"RH",RGClrs,styleLine|styleThick|styleNoRescale|styleNoTitle|styleNoLabel,0,0,0,BarLayer+1);
    Plot(RL,"RL",RGClrs,styleLine|styleThick|styleNoRescale|styleNoTitle|styleNoLabel,0,0,0,BarLayer+1);
    Plot(RH,"RH",RGClrs,styleLine|styleThick|styleNoRescale|styleNoTitle|styleNoLabel,0,0,0,BarLayer+1);
}
https://imgur.com/a/OeCYH
 

Similar threads