Simple Coding Help - No Promise.

Small request for AFL..actually didnt see any while going through the various threads here!

On a 1-minute TF I wanted to explore (real-time) the highest volume for last x days or volume higher than 'x' mins or MA of 'x' mins.
I believe for a 30days exploration, it should have a data history of 375 mins per day * 30= 11250 mins of data. Correct me if Iam wrong.
Thanks in advance.
 
Hi coders.... need a help
This is Pine Script code of RSI plotting Overbought and Oversold lines on price chart.This is provided in Trading view by RicardoSantos . The name of the indicator is "[RS]RSI Overbought/Oversold Levels V0".

study(title="[RS]RSI Overbought/Oversold Levels V0", shorttitle="[RS]RSIOOL.V0", overlay=true)
overbought = input(70)
oversold = input(30)
length = input(8)
smooth = input(4)

r = sma(rsi(close, length), smooth)

ob = cross(r, overbought) and rising(r, 1) ? close : ob[1]
os = cross(r, oversold) and falling(r, 1) ? close : os[1]
plot(ob, color=maroon, style=linebr, linewidth=2)
plot(os, color=green, style=linebr, linewidth=2)

Can It be coded in Amibrokar Afl. Kindly provide the Afl if possible.
Thanks
 
Hello everyone,
I need your help.

I have been using Guppy CBL in MetaStock for a while. Now I am trying to use it in AmiBroker using the following code, but the Graph Plot is not matching from the one showing in MetaStock. Can somone please correct the code for CBL-High and CBL-Low.

Code:
nR=2;
Cbl[nR]=Null;
 bCBL=False;
 
     for( i=nR; i < BarCount; i++)
     {
         if( (High[i-2]>High[i-1]) && (High[i-1]>High[i]) )
         {
             Cbl[i] = High[i-1];
             bCBL = True;
         }
         else if (bCBL)
         {
             if (High[i] > Cbl[i-1])
             {
                 Cbl[i] = Cbl[i-1];
                 bCBL = False;
             }
             else
             {
                 n = nR;
                 maxval[i] = High[i];
                 breakloop= False;
                 for (j = 1; NOT(breakloop) && j <= i; j++)
                 {
                     if (High[i-j] > maxval[i])
                     {
                         if (n>1)
                         {
                             maxval[i] = High[i-j];
                             n--;
                         }
                         else
                         {
                             Cbl[i] = High[i-j];
                             breakloop=True;
                         }
                     }
                 }
                 if (Cbl[i] > Cbl[i+1])
                 Cbl[i] = Cbl[i+1];
             }
         }
         else
         {
             Cbl[i] = Cbl[i-1];
         }
     if (Cbl[i]==0)
     Cbl[i] = Cbl[i-1];
     }
 
 Plot(Cbl,"",colorRed,1);
 Plot(C,"",-1,64);
I would request everyone to please fix this code.
Thank You
 
Hello Everyone,

Please help me in following code. I am facing error:-

Ln 3 Col 31
Error 30 Syntax Error, unexpected '('

Code is:-

_SECTION_BEGIN("Quasimodo");
AddTextColumn(FullName(), "Stock");
Filter = "Quasimodo"();
color = IIf(C>O,colorGreen,colorRed);
Plot(C, "", IIf(Filter, colorBlue, color), styleCandle);
_SECTION_END();

Thanks a lot
 

Attachments

Hello everyone,
I need your help.

I have been using Guppy CBL in MetaStock for a while. Now I am trying to use it in AmiBroker using the following code, but the Graph Plot is not matching from the one showing in MetaStock. Can somone please correct the code for CBL-High and CBL-Low.

Code:
_SECTION_BEGIN("Formula 1");
nR=2;
Cbl[nR]=Null;
 bCBL=False;
 
     for( i=nR; i < BarCount; i++)
     {
         if( (High[i-2]>High[i-1]) && (High[i-1]>High[i]) )
         {
             Cbl[i] = High[i-1];
             bCBL = True;
         }
         else if (bCBL)
         {
             if (High[i] > Cbl[i-1])
             {
                 Cbl[i] = Cbl[i-1];
                 bCBL = False;
             }
             else
             {
                 n = nR;
                 maxval[i] = High[i];
                 breakloop= False;
                 for (j = 1; NOT(breakloop) && j <= i; j++)
                 {
                     if (High[i-j] > maxval[i])
                     {
                         if (n>1)
                         {
                             maxval[i] = High[i-j];
                             n--;
                         }
                         else
                         {
                             Cbl[i] = High[i-j];
                             breakloop=True;
                         }
                     }
                 }
                 if (Cbl[i] > Cbl[i-1])
                 Cbl[i] = Cbl[i-1];
             }
         }
         else
         {
             Cbl[i] = Cbl[i-1];
         }
     if (Cbl[i]==0)
     Cbl[i] = Cbl[i-1];
     }
 
 Plot(Cbl,"",colorRed,1);
 Plot(C,"",-1,64);
_SECTION_END();
This is the Metastock code I have been using for CBL High.

Code:
HighDays := Input("Enter # days to cover last HIGH for CBL calc'n:", 3, 55, 13);

If(HIGH < HHV(HIGH, HighDays), {then ...} PREV, {previous CBLhi, else...}
If(Ref(L,-2) < Ref(L,-1) AND Ref(L,-2) < L AND Ref(L,-1) < L, {then ...} Ref(L,-2), {2nd day back low, else...}
If((Ref(L,-3)< Ref(L,-2) AND Ref(L,-3) < Ref(L,-1) AND Ref(L,-3) < L) AND (Ref(L,-2)< L OR Ref(L,-1) < L), {then ... } Ref(L,-3), {3rd day back low, else...}
If((Ref(L,-4)< Ref(L,-3) AND Ref(L,-4) < Ref(L,-2) AND Ref(L,-4) < Ref(L,-1) AND Ref(L,-4) < L) AND (Ref(L,-3)< L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then... } Ref(L,-4), {4th day back low, else...}
If((Ref(L,-5)< Ref(L,-4) AND Ref(L,-5) < Ref(L,-3) AND Ref(L,-5) < Ref(L,-2) AND Ref(L,-5) < Ref(L,-1) AND Ref(L,-5) < L) AND (Ref(L,-4)< L OR Ref(L,-3) < L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then ...} Ref(L,-5), {5th day back low, else...} PREV )))))
I have added Screenshots for CBL High in Amibroker as well as Metastock.


I would request everyone to please fix this code.
Thank You
 

Attachments

A = RSIa(HHV(High,-125),14) ;

AddColumn(A,"A",1.2);
Filter = 1;


-------------------------------------

Intent is need the RSI Value for Highest High Value of High in 3 Mins TF.
The above A brings back 100, not sure the problem with this...any turnarounds please
 
Please can anyone help on the following ......


The following code is giving audio output from active opened chart only, i want to get from all opend charts ....

if (SelectedValue(b1)==1) Say("Buy Signal triggered " + Close);


Thanks in advance.....
 

Similar threads