Simple Coding Help - No Promise.

vijkris

Learner and Follower
please guide

If i want to sell my buy position on base of volume.
Volume in current candle is less than 50% of previous candle then afl formula for this please
regards
I am good in simple tasks, like finding and correcting syntax errors etc.
bad in logics, maths and creation of codes..
so don't curse me, if my answer is wrong..

Code:
V1 = V;
V2 = Ref(V,-1);
V3 = (V2/V1);
Sell = IIf(V3>=2,1,Null);
 
Thanks But it is not working for me
I wish to exit buy on the basis of decrease in volume instead of price breaking below moving average.

_SECTION_BEGIN("Breakout Setting");
Buyperiods=Param("Breakout periods best is usually 18",5,1,100,1,1);
Sellperiods=Param("Exit Breakout",5,1,100,1,1);
Buy= C>Ref(HHV(High,Buyperiods),-1);
Sell= C<Ref(LLV(Low,Sellperiods),-1);

thanks
regards
 
Hello all,
I have a trouble in coding

I use ALERTIF function in each symbol, problem is email sends too much, (i want to recieve only one email)
Buy=cross(ref(C,-1),EMA(C,20));
AlertIf(Buy, "EMAIL", "Cross " + Name(), 1 );

The code in MQL4, it works, but I don't know how to change to AFL
static datetime AlertTime=Time[1];
if (Time[1] > AlertTime)
{
if (Email_Alert) SendMail("Cross", Symbol() + "," + TimeFrame );
AlertTime = Time[1];
}

Thanks for your help!
 
Last edited:
hi,
i am facing odd problem in amibroker. Whenever i draw a horizontal line and it goes on the right side out of current bar. with data updation its keeps moving back and forth. same with other line tools like rectangle if i plot it in future with data updation it keeps moving a bit. same with pitchfork. line studies are not remaining static.
any solution plz help.

regds,
 

Similar threads