Attachments forums

List of attachments posted on this forum.


All files on forums: 135714

Re: Coding Help

Cladi39, Sun Sep 09, 2018 3:50 am

Hello Mladen amd Mrtools, i need your help coding an indicator show up arrows when Super trend is up and down arrows when is down, my code is the fallow but only show up arrows, thanks in advance.

double ST(int i)
{
double up = iCustom(Symbol(),0,"SuperTrend nrp (new format)",0,i);
double dn = iCustom(Symbol(),0,"SuperTrend nrp (new format)",1,i);

if(up)
{
return(1);
}
if(dn)
{
return(-1);
}

return(0);
}

bool Arrowup(int i)
{
bool up=false;

up = ST(i)==1;

if(up)
{
return true;
}
return false;

}
bool Arrowdn(int i)
{
bool dn=false;

dn = ST(i)==-1;

if(dn)
{
return true;
}
return false;
}
All files in topic