Simple Coding Help - No Promise.

travi

Well-Known Member
Losslover's code is working in real time. But it keeps shouting for 3 minutes until bar closes and next one printed. Actually I don't need loVolume and I used exrem to avoid continuous shouting. But that didn't work.
What I want is, AFL should alert when volume is high and stop until next bar with hi volume is printed.
Then that's what i coded, so you can try it.

Only once per bar, then reset until next True bar.
If there are consecutive bars it will repeat after that interval.

Remove the exrem part else you will get high vol true only after a low volume true condition.
 
Last edited:

VJAY

Well-Known Member
Replace line that plots with plotshape.
Dear mb,
Can you please help here...I tryed to change plot in code but it throwing error...Please modify this afl....If possible please add an sound alert too..

_SECTION_BEGIN("HiLo Vol N");

n=Day() != Ref(Day(), -1);

a=LowestSince(n,V);


Plot(shapeDownArrow, colorBlue, 0, H, -20);


_SECTION_END();
 
Gentlemen,

Hope all of you are rocking well, belated wishes for a super-successful NEW YEAR 2019.

Need a little help with the SuperTrend/Rocket combination AFL created or modified by none other than Kelvin Hand (thank you brother).

Issue is there is repetition of signal for the same scrip throughout. I am aware that we have the ExRem command which will help, but strangely this code as TrendUp and TrendDown and I did give it my best to modify, having failed, I thought I will look up for the experts here for assistance.

Removing the code, to have clarity.
 
Last edited:
Dear mb,
Can you please help here...I tryed to change plot in code but it throwing error...Please modify this afl....If possible please add an sound alert too..
Vijay Sir, please see if the code given below helps. I have not changed your Hi / Lo conditions, if you want you can use Josh1 Sirs conditions as well. Thanks.

Code:
_SECTION_BEGIN("HiLo Vol of Day");

n = Day() != Ref(Day(), -1);
barcomplete = BarIndex() < LastValue(BarIndex());

Hi = HighestSince(n,V);
Lo = LowestSince(n,V);
 
PlotShapes(Hi*shapeUpArrow,colorbrightgreen,0,L,-20);
PlotShapes(Lo*shapedownArrow,colorred,0,H,-20);

CondHi = barcomplete AND Hi == 1;
CondLo = barcomplete AND Lo == 1;

if(EndValue(CondHi)==1) Say("High Volume Alert at" +C);
if(EndValue(CondLo)==1) Say("Low Volume Alert at" +C);

_SECTION_END();
 
But it keeps shouting for 3 minutes until bar closes and next one printed.
Joshiji,
That means you are using 3-minute intraday chart. Please change the second argument of SayOnCond( "High Volume be alert", 60 ); to greater than 180 seconds.
Actually I don't need loVolume and I used exrem to avoid continuous shouting. But that didn't work.
What I want is, AFL should alert when volume is high and stop until next bar with hi volume is printed.
Best resource friendly effective solution would be to use AlertIf(). Save .wav with your affirmations (recorded in own voice or someone else's voice which would trigger your subconscious alertness - I use my father's voice) and play it by calling AlertIf() from AFL. Also check PlaySound() please.
 
Last edited:

VJAY

Well-Known Member
Vijay Sir, please see if the code given below helps. I have not changed your Hi / Lo conditions, if you want you can use Josh1 Sirs conditions as well. Thanks.

Code:
_SECTION_BEGIN("HiLo Vol of Day");

n = Day() != Ref(Day(), -1);
barcomplete = BarIndex() < LastValue(BarIndex());

Hi = HighestSince(n,V);
Lo = LowestSince(n,V);

PlotShapes(Hi*shapeUpArrow,colorbrightgreen,0,L,-20);
PlotShapes(Lo*shapedownArrow,colorred,0,H,-20);

CondHi = barcomplete AND Hi == 1;
CondLo = barcomplete AND Lo == 1;

if(EndValue(CondHi)==1) Say("High Volume Alert at" +C);
if(EndValue(CondLo)==1) Say("Low Volume Alert at" +C);

_SECTION_END();
Dear bbhanushali,
Thanks for your help ....actually i don't need to hi/lo in code ..I only want when low volume bar prints give one arrow pointing that bar and same time some audio alert ....please can you modify it ?


it prints every bar as lowvolume bars

1546599733306.png
 
Last edited:
Dear bbhanushali,
Thanks for your help ....actually i don't need to hi/lo in code ..I only want when low volume bar prints give one arrow pointing that bar and same time some audio alert ....please can you modify it ?


it prints every bar as lowvolume bars

View attachment 32369
Vijay Sir, Can you post Varun Sir's "afl" that plots line for low volume bar or even the link will do to see the logic. Thanks
 

VJAY

Well-Known Member
Vijay Sir, Can you post Varun Sir's "afl" that plots line for low volume bar or even the link will do to see the logic. Thanks
Its same which you poasted I think...

_SECTION_BEGIN("HiLo Vol N");

n=Day() != Ref(Day(), -1);

a=LowestSince(n,V);
hh=ValueWhen(V==a,H);
ll=ValueWhen(V==a,L);

Plot(hh,"\nLVhb",colorGreen,styleDashed|styleThick);
Plot(ll,"\nLVlb",colorRed,styleDashed|styleThick);

_SECTION_END();
 

Similar threads