Simple Coding Help - No Promise.

for below line of code,
Code:
for( i=1; i<BarCount-1; i++ )
1) which Bar will be processed first, the latest bar or the first bar of past in OHLCV data ?
2) if latest bar will be processed first, then does AB process OHLCV data till it gets sufficient bars to fill the chart window or it continues till all the data is processed in file ?

R
 
Need help to specify BUY/ SELL condition for new day in AFL. For example I am searching signal for ma crossover. Now I want that fresh signal should start each day till end of the day and next day it should show new signal irrespective of previous day signal (whether closed or not).
The same should reflect in exploration window also. Right now I am using below code for exploration result.
Code:
Filter = Buy OR Sell;
AddColumn(Buy, "Daily Long", 1.2, colorWhite, colorDarkGreen);
AddColumn(Sell, "Daily Short", 1.2, colorWhite, colorDarkRed);
 
Last edited:
Need help to specify BUY/ SELL condition for new day in AFL. For example I am searching signal for ma crossover. Now I want that fresh signal should start each day till end of the day and next day it should show new signal irrespective of previous day signal (whether closed or not).
The same should reflect in exploration window also. Right now I am using below code for exploration result.
Code:
Filter = Buy OR Sell;
AddColumn(Buy, "Daily Long", 1.2, colorWhite, colorDarkGreen);
AddColumn(Sell, "Daily Short", 1.2, colorWhite, colorDarkRed);
Can anybody help as per quoted requirement. :confused:
The code I am using:
Code:
Buy = some condition;
Sell = some condition;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

Filter = Buy OR Sell;
AddColumn(Buy, "Daily Long", 1.2, colorWhite, colorDarkGreen);
AddColumn(Sell, "Daily Short", 1.2, colorWhite, colorDarkRed);
 
Hi ,

I am running the below explorer on 5 minutes Timeframe, with setting Range = all quotes.
The results shows data only from last 1000 bars , although DB has more than 10 thousands 5 min. bars .

How can I run the explorer on all data.

regards



TimeFrameSet(inDaily); V2 = MA(V,2); TimeFrameRestore(); // for last 2 days average volume on daily timeframe
Bars_so_far_today = 1 + BarsSince( Day() != Ref(Day(), -1));
Vtoday = Sum(V,Bars_so_far_today)*100/V2; // ratio of todays intraday volume to 2 day average daily volume


Filter = Vtoday >10 AND TimeNum()>=092900 AND TimeNum()<=093100 ;
 
I am exploring the result based on some condition. But the issue is that Buy Sell signal showing properly on chart but when I use the same AFL for scanning some of the scripts are not in the result list irrespective of their signal. What am I missing here ?
Some part of code which I am using is below:
Code:
Buy = Some condition;
Sell = TimeNum() > 152900;
Short = Some condition;
Cover = TimeNum() > 152900;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
Cover = ExRem(Cover, Short);
Short = ExRem(Short, Cover);

Filter =  Buy OR Short;
AddColumn(Buy, "Buy", 1.2, IIf(Buy,colorWhite, colorDefault), IIf(Buy,colorGreen, colorDefault));
AddColumn(Short, "Short", 1.2, IIf(Short,colorWhite, colorDefault), IIf(Short,colorRed, colorDefault));

PlotShapes(shapeUpArrow*Buy, colorGreen);
PlotShapes(shapeDownArrow*Short, colorRed);
 

onequorauser

Well-Known Member
HI all,

Is there a way to get a synchronised cross hair in amibroker for linked symbols? Basically I have the same chart for hourly, 30M and 15 M put up on my layout. I would like the cross hair to hover over the same time candle in all three charts.

This is fairly straight forward in NT but I am not able to find this option directly in Ami though the helpfile says that cross hair can be turned on or off globally.

So I am wondering if this is feasible through AFL. Thanks in advance!
 

niftytaurus

Well-Known Member
hi
this afl plot cpr range of floor pivot.the formulae is in afl..But its showing syntax error..could somebody please edit it & correct it.
thanks

//@version=3
//
// Developing Central Pivot Range (CPR) Indicator for TradingView
// This script implements a developing version of Central Pivot Range described at http://pivotboss.com/2010/05/31/a-quick-guide-to-the-pivot-range
// by Sherwin Daganato, 20171126
// https://github.com/sherwind/pinescript-developing_cpr
//
// Inputs:
//
// Developing CPR resolution - Either D (Daily), W (Weekly), M (Monthly) or 12M (Yearly). The default value is M.
//
Study(Title="SD - Developing Central Pivot Range - Daily Weekly Monthly Yearly", shorttitle="[SD]Developing CPR", overlay=True)

res = input(Title="Developing CPR resolution", defval="M", options=["D", "W", "M", "12M"])

pivot = (High + Low + Close) / 3.0
bc = (High + Low) / 2.0
tc = (pivot - bc) + pivot

dtc = security(tickerid, res, tc, lookahead=barmerge.lookahead_on)
dpp = security(tickerid, res, pivot, lookahead=barmerge.lookahead_on)
dbc = security(tickerid, res, bc, lookahead=barmerge.lookahead_on)

Plot(dtc >= dbc ? dtc : dbc, Title="Developing TC", style=line, color=teal, linewidth=2)
Plot(dpp, Title="Developing PP", style=line, color=teal, linewidth=2)
Plot(dtc >= dbc ? dbc : dtc, Title="Developing BC", style=line, color=teal, linewidth=2;
 

niftytaurus

Well-Known Member
cpr range formulae..

pivot = (High + Low + Close) / 3.0
bc = (High + Low) / 2.0
tc = (pivot - bc) + pivot


Can somebody give afl to plot it daily cpr range daily..& on historical chart also..i.e plot daily on chart
i have given above that formulae.
thanks
 

okabira

Well-Known Member
People using amibroker ..

I need help...................

I have 2 folders in Custom folders

path 1 - E:\Amibroker\Formulas\Custom\EOD

path 2 - E:\Amibroker\Formulas\Custom\Intraday

When I change parameters of moving average in intraday database .. and then close amibroker

then when I open EOD database .. the change is happening here in this folder too ..

Earlier this didnt happened and everything changed in their respective database ..

What is wrong .. fed up for 1 week trying .. no solution..
 

Similar threads