Simple Coding Help - No Promise.

Hope this helps. Thnx
Code:
_SECTION_BEGIN("Multi Timeframe JNSAR");

//JNSAR - Indicator ideated by Mr Illango

Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Period = Param("Length",5,5,100,1);

//.............Daily Timeframe JNSAR ......................
DJNSARclrUp = Paramcolor("Daily JNSAR Up color",colorAqua);
DJNSARclrDn = Paramcolor("Daily JNSAR Dn color",colorOrange);
DJNSARwidth = Param("Daily JNSAR Width",3,1,5,1);

TimeFrameSet(inDaily);
disum = (Sum(ema(High,Period),Period) + Sum(ema(Low,Period),period) + Sum(ema(Close,Period),period));
djnsar = round(disum/15);
TimeFrameRestore();

dhjnsar = Timeframeexpand(djnsar,inDaily, expandfirst);
djnsarclr = IIf(C>djnsar,DJNSARclrUp,DJNSARclrDn);

Plot(dhjnsar,"",djnsarclr,styledots|stylenoline|styleNoRescale,0,0,0,0,DJNSARwidth);

//.............Hourly Timeframe JNSAR ..............
HJNSARclrUp = Paramcolor("Hourly JNSAR Up color",colorbrightgreen);
HJNSARclrDn = Paramcolor("Hourly JNSAR Dn color",colordarkred);
HJNSARwidth = Param("Hourly JNSAR Width",2,1,5,1);

TimeFrameSet(inhourly);
hisum = (Sum(ema(High,Period),Period) + Sum(ema(Low,Period),period) + Sum(ema(Close,Period),period));
hjnsar = round(hisum/15);
TimeFrameRestore();

hhjnsar = Timeframeexpand(hjnsar,inHourly, expandfirst);
hjnsarclr = IIf(C>hjnsar,HJNSARclrUp,HJNSARclrDn);

Plot(hhjnsar,"",hjnsarclr,styledashed|stylestaircase|styleNoRescale,0,0,0,0,HJNSARwidth);
//====================
//................Flexible/Other Choice Timeframe JNSAR .........
jnsartf = Param("Flexible JNSAR Time frame (min)",15,1,1440,1);
jnsartfrm = in1Minute*jnsartf;

FJNSARclrUp = Paramcolor("Flexible TF JNSAR Up color",colorteal);
FJNSARclrDn = Paramcolor("Flexible TF JNSAR Dn color",colorplum);
FJNSARwidth = Param("Flexible TF JNSAR Width",1,1,5,1);

TimeFrameSet(jnsartfrm);
fisum = (Sum(ema(High,Period),Period) + Sum(ema(Low,Period),period) + Sum(ema(Close,Period),period));
fjnsar = round(fisum/15);
TimeFrameRestore();

fjnsar = Timeframeexpand(fjnsar,jnsartfrm, expandfirst);
fjnsarclr = IIf(C>fjnsar,FJNSARclrUp,FJNSARclrDn);

Plot(fjnsar,"",fjnsarclr,styledashed|stylestaircase|styleNoRescale,0,0,0,0,FJNSARwidth);
//=====================

//..............Chart Timeframe JNSAR ..................

// JNSAR = (5 days HEma+5Days CEma+5Days LEma)/15
isum = (Sum(ema(High,Period),Period) + Sum(ema(Low,Period),period) + Sum(ema(Close,Period),period));
jnsar = round(isum/15);
buy = Cross(Close, jnsar);
sell =Cross(jnsar,Close);
Short = Sell;
Cover = Buy;
color = IIf(C>jnsar,colorGreen,colorRed);

Plot(jnsar,"JNSAR",color,styleLine|stylenorescale);
PlotShapes(Buy*shapeUpArrow,colorGreen,0,L,-15);
PlotShapes(Sell*shapedownArrow,colorred,0,H,-15);

//===================


_SECTION_END();
Dear bbhanushali,

Thank you very much
 
hello,
i was in search of EMA crossover scan. so I came across this code::

// Downloaded From https://www.WiseStockTrader.com
_SECTION_BEGIN("EMA CrossOver");


Buy = BarsSince( Cross( EMA( Close, 50), EMA( Close, 100 ) ) ) <= 1;
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBrightGreen);

Filter = BarsSince( Cross( EMA( Close, 50 ), EMA( Close, 100 ) ) ) <= 1;
AddColumn( Close, "Close " );
AddColumn( Open, "Open " );
AddColumn( High, "High " );
AddColumn( Low, "Low " );
AddColumn( Volume, "Volume " );
AddColumn(Filter,"Buy",1);
_SECTION_END();

but I think this only gives buy signal so I tried to edit code, can I someone help with this...

// Downloaded From https://www.WiseStockTrader.com
_SECTION_BEGIN("EMA CrossOver");


Buy = BarsSince( Cross( EMA( Close, 50), EMA( Close, 100 ) ) ) <= 1;
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBrightGreen);

Filter = BarsSince( Cross( EMA( Close, 50 ), EMA( Close, 100 ) ) ) <= 1;
AddColumn( Close, "Close " );
AddColumn( Open, "Open " );
AddColumn( High, "High " );
AddColumn( Low, "Low " );
AddColumn( Volume, "Volume " );
AddColumn(Filter,"Buy",1);
_SECTION_END();

Sell = BarsSince( Cross( EMA( Close, 100), EMA( Close, 50 ) ) ) <= 1;
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorBrightRed);

Filter = BarsSince( Cross( EMA( Close, 50 ), EMA( Close, 100 ) ) ) <= 1;
AddColumn( Close, "Close " );
AddColumn( Open, "Open " );
AddColumn( High, "High " );
AddColumn( Low, "Low " );
AddColumn( Volume, "Volume " );
AddColumn(Filter,"Sell",1);
_SECTION_END();



is this right ?? or need to change more
 
Hello Friends and Gurus ,
need your help in exploring the result ,
i have cash scripts in watchlist0 and futures in watchlist1 , Now when scripts have O==H or O==L in both watchlist it should show in explorer e.g iif ACC and ACC-1 both have O==H ,Then it should filter ACC in result ,
i have tried to put my query in best possible way , waiting for valuble repl
 
Hello Friends and Gurus ,
need your help in exploring the result ,
i have cash scripts in watchlist0 and futures in watchlist1 , Now when scripts have O==H or O==L in both watchlist it should show in explorer e.g iif ACC and ACC-1 both have O==H ,Then it should filter ACC in result ,
i have tried to put my query in best possible way , waiting for valuble repl
Exploration cannot use two watch lists concurrently but AFL can handle multple stocks together.
You will have to use watch list0, access individiual futures scrip using Foreign function and compare price data....
 
Exploration cannot use two watch lists concurrently but AFL can handle multple stocks together.
You will have to use watch list0, access individiual futures scrip using Foreign function and compare price data....
Thank you Mastermind for quick responce ,
sir i have kept cash scripts in watchlist0 and Futures in watchlist1 and also i have added both cash @ futures in watchlist3 ... i tried using Filter = O==H and inwatchlist(0) and inwatchlist(1) ; and Run Explorer on watchlist3 , but no correct result found , so kindly show me correct way to get this done .
Thank you
 
hello,
I open 2 charts in amibroker 5min and 30min. if I draw a rectangle on a 30min chart will it show on 5min chart also? because I don't see it drawing so was a little confused... is there any setting for this?
 

josh1

Well-Known Member
AVGcross.png

Hello,

Is it possible to plot pivot points for HHV and LLV between two crosses of Averages. Red line is 9MA and blue line is 20MA.
 

Similar threads