Simple Coding Help - No Promise.

Hi ,

When it comes to buy or sell signals dont enter pozision.Wait if next bars close above 20 pips from signal then buy..
How do I write a formula in this way.

example :

Buy = cross(a,b);
sel l= cross(b,a);
 
Does anyone face problems with AddTextColumn function in Explorer. For me, this never seems to give correct value.

Best example Try running the CandleStickPattern in Explorer mode. It gives values if you select only "recent bar". If you select more than that .. all the other Text Columns shows null.
 

trash

Well-Known Member
Does anyone face problems with AddTextColumn function in Explorer. For me, this never seems to give correct value.

Best example Try running the CandleStickPattern in Explorer mode. It gives values if you select only "recent bar". If you select more than that .. all the other Text Columns shows null.
There is no problem with AddTextColumn. There is a problem with your reading and studying abilities.

Since you don't show your code there is only one 100% guess .. your code uses Writeif function within Addtextcolumn.

Now if but only if you would be able to properly read the function reference of WriteIf in the AB manual then you would see and realize that writeif displays text of selected value (with selected value in analysis being equal to lastvalue) but not an array of strings.

So that's why use Filter = Status( "lastbarinrange" ); instead of Filter = 1;

EDIT: in case you are referring to this one http://www.wisestocktrader.com/indicators/3212-candle-pattern-exploration
use Filter = Status( "lastbarinrange" ) AND STS != "";
 

Attachments

Last edited:

amsin21

Well-Known Member
Hi,
some formula does not work in intraday timeframes (5min,10min and 15min) how to change that to work in all timeframes??
@ashok.... go for Ichimoku... learn @different T/F, works in all T/F.
 

ajeetsingh

Well-Known Member
Sir,
Please provide me the code to get time passed or bars passed since last buy or sell signal.
Like if buy is cross over of MACD then how many bars before it occured since current bar.
Thanks
 

sr114

Well-Known Member
Sir,
Please provide me the code to get time passed or bars passed since last buy or sell signal.
Like if buy is cross over of MACD then how many bars before it occured since current bar.
Thanks
u have to define ur buy and sell condition and then put this code snippet.

Code:
PositionOpen = IIf(BarsSince(Buy==1) < BarsSince(Sell==1),1,-1); // using 1 for Long and -1 for short
BarsOpen = IIf(PositionOpen==1,BarsSince(Buy==1),IIf(PositionOpen==-1,BarsSince(Sell==1),0));
title=EncodeColor(colorOrange)+ "Bars Since Sig : " +  NumtoSTR(Barsopen,1.0)+"\n";
 
hii houmansat,

The AFL formula is repaint, the low appears when the stock reaches 2-3% from the low price, likewise the high appears after 2-3 % fall from the price. so it is not correct always. it is zig zig afl by the way.
 

Similar threads