Slow K% stochastic. Anyone know how to plot this please?
Have you looked in the Amibroker User Guide? Check STOCHK function.
Slow K% stochastic. Anyone know how to plot this please?
Have you looked in the Amibroker User Guide? Check STOCHK function.
Have tried that alter. Not much help. Online searches not really helping much either. Anyone? SlowK?
Plot( C, "Close", colorBlack , styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
BuyStartDate = ParamDate( "Buy Start Date", "2012-06-01" );
EndDate = ParamDate( "Last Buy Date", "2020-01-01" );
DateOK = IIf(DateNum() >= BuyStartDate , 1, 0); //AND DateNum() <= EndDate
Short = Close>1 AND DateOK ; ShortPrice=Close;
Cover = RSI(5 ) < 20; CoverPrice=Close;
entry = ShortPrice;
target1 = entry - (entry * .050);
end = LastValue( BarIndex() );
Plot(LineArray(buystartdate,target1, end ,target1,1), "", colorOrange, styleLine);
//LineArray( x0, y0, x1, y1, extend = 0, usebarindex = False )
Show me a long only system that performs well in a sideways or bear market.
PositionSize = -20;
PositionScore = 1 - C/10;
XAO = Foreign("XSO","Close");
XAOMA = MA(XAO, 75);
Buy = Sell = 0;
SetTradeDelays(1, 1, 1, 1);
BuyPrice = Close;
SellPrice = Close;
Length = 260; // 1 year
BuySig =
Close > HHV(Ref(Close, -1), Length)
AND XAO > XAOMA
;
SellSig =
Close < Ref( LLV(Close, Length), -1)
OR XAO < XAOMA
;
Buy = ExRem(BuySig, SellSig);
Sell = ExRem(SellSig, BuySig);
ApplyStop(stopTypeLoss, stopModePercent, amount = 25, False );
Could someone please tell me what I have wrong. I get an error in the plot.
Plot( C, "Close", colorBlack , styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
BuyStartDate = _DT( ParamDate( "Buy Start Date", "2012-06-01", 1) );
EndDate = _DT( ParamDate( "Last Buy Date", "2020-01-01", 1) );
DateOK = IIf(DateNum() >= BuyStartDate , 1, 0); //AND DateNum() <= EndDate
Short = Close>1 AND DateOK ; ShortPrice=Close;
Cover = RSI(5 ) < 20; CoverPrice=Close;
entry = Lookup(ShortPrice, BuyStartDate, -1);
target1 = entry - (entry * .050);
end = LastValue( BarIndex() );
Plot(LineArray(Lookup(BarIndex(), BuyStartDate), target1, end ,target1, 1), "", colorOrange, styleLine);
//LineArray( x0, y0, x1, y1, extend = 0, usebarindex = False )
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
showsl = ParamToggle("Stop Loss Line", "Show|Hide", 0);
res=HHV(H,10);
sup=LLV(L,10);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
s5d=IIf(avn==1,sup,res);
if (showsl == 0)
{Plot(s5d,"Stop Loss",colorCustom14,styleDots);}
exitlong = Cross(s5d, H);
PlotShapes(exitlong * shapeNone, colorBlack,0,H,-10);
exitshort = Cross(L, s5d);
PlotShapes(exitshort * shapeNone, colorBlack,0,L,-15);
Buy = exitshort;
Sell = exitlong;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
for(i=BarCount-1;i>1;i--)
{
if(Buy[i] == 1)
{
entry = C[i];
sig = "BUY";
sl = s5d[i];
tar1 = entry + (entry * .050);
tar2 = entry + (entry * .075);
tar3 = entry + (entry * .100);
bars = i;
i = 0;
}
if(Sell[i] == 1)
{
sig = "SELL";
entry = C[i];
sl = s5d[i];
tar1 = entry - (entry * .050);
tar2 = entry - (entry * .075);
tar3 = entry - (entry * .100);
bars = i;
i = 0;
}
}
Offset = 20;
Clr = IIf(sig == "BUY", colorLime, colorRed);
ssl = IIf(bars == BarCount-1, s5d[BarCount-1], Ref(s5d, -1));
sl = ssl[BarCount-1];
Plot(LineArray(bars-Offset, tar1, BarCount, tar1,1), "", Clr, styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar2, BarCount, tar2,1), "", Clr, styleLine, Null, Null, Offset);
Plot(LineArray(bars-Offset, tar3, BarCount, tar3,1), "", Clr, styleLine, Null, Null, Offset);
_SECTION_END();
Hi folks,
Quick question for AB aficionados - is there a way to control text size for PlotText function?
Thanks in advance
Dre
Could someone help me plot the value of pSAR for the following day, as a small horizontal line on the chart, using this formula?
SAR tomorrow = SAR today + AF(EP trade - SAR(today)
where AF = acceleration factor, and EP = highest high reached yesterday
I know this isn't the exact formula, but it's sort of close.
Thanks.
Something along these lines should work:
extendLine = 3;
startPlot = BarCount - 1 - extendLine;
SART = ****;
Plot( C, "", color, styleBar);
Plot( IIf( BarIndex() >= startPlot, LastValue(SART), Null), "", color, styleThick, Null, Null, extendLine );
Take a look at GfxSelectFont()
Thank colion, however GfxSelectFont does not seem to effect PlotText().
In order to benefit from it it seems I would need to use either GfxTextout or GxfGrawText and I've struggled to get either to work correctly. Is that right?
Once you jump into low level graphics then as far then as I know you have to go in all the way. Have you seen the tutorial at http://www.amibroker.com/guide/h_lowlevelgfx.html? Of course, if you are satisfied with one font for the entire chart you can use Tools >> Preferences >> Miscellaneous to change the font. I believe that these are your two choices.
Hello and welcome to Aussie Stock Forums!
To gain full access you must register. Registration is free and takes only a few seconds to complete.
Already a member? Log in here.