Simple Coding Help - No Promise.

extremist

Well-Known Member
Firstly you should not write in SMS talk abbreviating every second word. That makes you posts hardly readable but rather annoying. Are you ten years old? Secondly I have not said at all that you would be dumb but in fact I said that you should not claim something as fact if you actually don't know for sure. It's of no surprise that the whole Internet is filled with so much nonsense because everyone has to say something no matter what it is. That's not a problem at all with one exception ... i.e. if it is related to some serious technical stuff then everyone should take care that what is said is bullet proof otherwise it is useless chit chat without any quality in it. I further said that you should rather add something like "AFAIK" at the start of your sentence if you are not sure and having just basic knowledge. That way you make yourself less vulnerable. Of course you are still free to continue ignoring good advice. But don't be surprised if you get set straight again by someone else.
even i have no problem with the advice u gave.
but if u r so called guru then please go through the first line i said completely and then start pouring your knowledge all over.
and if can not get the meaning of tht then leave it.
anyways ....

if u go through all my replies then u will find me always using the same language u expected. but here i was very confident so used that wording.
the thing u explaind is in regarding merging the two data sets and the thing i mentioned is about expanding the daily database to IEOD database

i hope at least now u can understand it. try to use ur lill brain left in the upper compartment.

and if my shortcuts bother u too much then don't read.

i don't like to flood this good thread thread with useless crap.
sorry to thread owner and it's followers.
 
Last edited:

trash

Well-Known Member
even i have no problem with the advice u gave.
but if u r so called guru then please go through the first line i said completely and then start pouring your knowledge all over.
and if can not get the meaning of tht then leave it.
anyways ....
i don't like to flood this good thread thread with useless crap.

sorry to thread owner and it's followers.
If you would have no problem with good advice you would not continue writing in SMS talk for example. People are here to learn something but if they learn the wrong stuff then the wrong stuff gets spread all over again and again until it is common wrong knowledge. As I said IMO this should not be treated as some chi chat room but if instead you want some real quality here for example then you should actually add some quality and not some SMS chit chat because of being bored to start with.

And since we talk about quality people should use code tags if they post their codes and if it is not their codes then they should first ask the original developer for allowance to post those codes and on top of that they should not remove reference that points to those original developers. Anything else is disrespectful and non quality. Or to talk the chit chat way ... it is far away from being a cool fella.
 

candle

Well-Known Member
Further I have some tickers in 1 min data in my database for say last 2 years that I want to change/replace with eod data for last 18 months. Can I do it without any problem. Can I save EOD data files in IEOD data settings. What should be the steps to do it. I just do not want to do something, that I do not know, as I have a big database (though I want to reduce it in size)


I tried to feed following EOD data to Amibroker configured for IEOD

<Ticker>,<Date>,<Time>,<Open>,<High>,<Low>,<Close>,<Volume>
AARTIIND,20131101,00:00,79.60,80.00,78.10,78.75,8737,0
AARTIIND,20131103,00:00,79.05,82.00,79.00,81.05,9160,0
AARTIIND,20131105,00:00,83.70,83.70,79.00,82.30,12642,0
AARTIIND,20131106,00:00,84.95,84.95,80.00,80.45,5769,0
AARTIIND,20131107,00:00,81.00,82.60,81.00,81.95,4672,0
AARTIIND,20131108,00:00,82.00,82.50,80.00,80.65,6234,0
AARTIIND,20131111,00:00,80.75,82.65,78.65,81.85,7822,0
AARTIIND,20131112,00:00,81.50,83.00,81.00,81.10,6194,0
AARTIIND,20131113,00:00,80.70,82.25,80.05,80.70,3978,0
AARTIIND,20131114,00:00,80.30,92.50,80.00,88.15,88821,0
AARTIIND,20131118,00:00,91.80,91.90,89.05,89.70,47552,0
AARTIIND,20131119,00:00,89.55,89.55,85.10,85.45,19094,0
AARTIIND,20131120,00:00,85.10,88.85,85.10,86.05,15893,0
AARTIIND,20131121,00:00,86.85,86.85,82.70,83.25,13544,0
AARTIIND,20131122,00:00,83.60,84.20,82.50,83.10,3957,0
AARTIIND,20131125,00:00,83.50,85.00,82.65,84.35,11832,0
AARTIIND,20131126,00:00,85.00,86.75,84.20,86.15,16751,0
AARTIIND,20131127,00:00,86.50,86.50,83.10,84.40,4155,0
AARTIIND,20131128,00:00,85.00,85.00,81.00,83.35,12661,0
AARTIIND,20131129,00:00,85.70,85.70,82.45,84.40,3676,0


Though I can see this data in quotation editor but not in chart in candle form

The error is

Not enough data available
To plot any chart atleast 3 data bars are needed, but there are only 0 bars in 'AARTIND'

Please provide some solution

Thanks
a1b1trader,

check the script name. It is " AARTIIND " and not " AARTIND " .

regards
candle
 
Last edited:

cellclinic

Well-Known Member
Re: Is It Possible ???

Thanks for replying ... but unable to expand pic to view ... But what i am able to understand is to edit formula ... but i am unable to find plot grid option editing price option ...
_SECTION_BEGIN("Price1");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

Regards ...

Yes, it is possible. De-activate built-in grid via SetChartOptions and make a loop including PlotGrid().

See
 

amitrandive

Well-Known Member
Dear All

A small help needed for exploration,I am trying to explore to sort out as per T1 or T2,but not getting it.


Code:
TF=(ATR(1)*100/ATR(14));IQF=ATR(20)*100/Close;
T1=TF>2 AND IQF<100;
T2=TF>2 AND IQF>100;
Filter=T1 OR T2;
AddColumn(C,"close",1.2);
AddColumn(TF,"TF",1.2);
AddColumn(IQF,"IQF",1.2);
AddColumn(IIf(T1,T1,Null)  ," High "  ,6.2,1.2,colorGreen);
AddColumn(IIf(T2,T2,Null)," Low ",6.2,1.2,colorOrange);
Dear amit this code is frm wise stock
i seen ur comment there. by seeing ur comment there i chked it yday and was surprised tht wht is the zing in code ?
tht was prompted u to like tht thing.

it might be possible tht i completely missed tht zing and i'm then plz elaborate it to me.

The thing i understood frm code is tht ....

wht ever he said is not matching the calculation of code.
if u plot those lines u can see tht TF is always been greatr than 2
and
IQF will always be lesser than 100 so u will always be in T1 condition
so ur not getting exploration right.
Actually the code is wrong

correct me if i'm wrong.

extremist

You are right!!!
I was coding it the wrong way.Finally managed to correct it.Here is the correct exploration.


Code:
TF=(ATR(1)*100/ATR(14));IQF=ATR(20)*100/Close;
T1=TF<100 AND IQF>2;
T2=TF>100 AND IQF>2;
Filter=T1 OR T2;
AddColumn(C,"close",1.2);
AddColumn(TF,"TF",1.2);
AddColumn(IQF,"IQF",1.2);
AddColumn(IIf(T1,T1,Null)  ," T1 "  ,6.2,1.2,colorGreen);
AddColumn(IIf(T2,T2,Null)," T2 ",6.2,1.2,colorOrange);
 

cellclinic

Well-Known Member
Hello Amit ...

Could you plz elaborate the method to get better view with results it shows ? as i am new to amibroker so need some details ...


extremist

You are right!!!
I was coding it the wrong way.Finally managed to correct it.Here is the correct exploration.


Code:
TF=(ATR(1)*100/ATR(14));IQF=ATR(20)*100/Close;
T1=TF<100 AND IQF>2;
T2=TF>100 AND IQF>2;
Filter=T1 OR T2;
AddColumn(C,"close",1.2);
AddColumn(TF,"TF",1.2);
AddColumn(IQF,"IQF",1.2);
AddColumn(IIf(T1,T1,Null)  ," T1 "  ,6.2,1.2,colorGreen);
AddColumn(IIf(T2,T2,Null)," T2 ",6.2,1.2,colorOrange);
 

xsis

Active Member
can anybody help me on this?
the main post has screenshots regarding the same!

dear coders

i reiterate tht this code which i am looking for is not abt any pattern exploration thingy! the logic is very clear and simple.

for a BEARISH SCENARIO:
1. previous candle (candle1) should be bullish candle (irrespective of the pattern).
2. candle2 should be bearish candle (irrespective of the pattern) in such a way that candle2 breaches high of candle1 and closes within the H-L range of candle1. also, it should give a negative close i.e. close<open

or a BULLISH SCENARIO:
1. previous candle (candle1) should be bearish candle (irrespective of the pattern).
2. candle2 should be bullish candle (irrespective of the pattern) in such a way that candle2 breaches low of candle1 and closes within the H-L range of candle1. also, it should give a positive close i.e. close>open

need your help forum!
 

extremist

Well-Known Member

extremist

You are right!!!
I was coding it the wrong way.Finally managed to correct it.Here is the correct exploration.


Code:
TF=(ATR(1)*100/ATR(14));IQF=ATR(20)*100/Close;
T1=TF<100 AND IQF>2;
T2=TF>100 AND IQF>2;
Filter=T1 OR T2;
AddColumn(C,"close",1.2);
AddColumn(TF,"TF",1.2);
AddColumn(IQF,"IQF",1.2);
AddColumn(IIf(T1,T1,Null)  ," T1 "  ,6.2,1.2,colorGreen);

AddColumn(IIf(T2,T2,Null)," T2 ",6.2,1.2,colorOrange);
nice work amit...
just to get it easy to work out i added few more lines to ur code.

Code:
TF=(ATR(1)*100/ATR(14));IQF=ATR(20)*100/Close;
T1=TF<100 AND IQF>2;
T2=TF>100 AND IQF>2;
if( ParamToggle("Plot TF", "No|Yes", 0))	
Plot(tf,"TF",colorBlack);
if( ParamToggle("Plot IQF", "No|Yes", 1))	
Plot(IQF,"IQF",colorBlack);

Filter=T1 OR T2;
AddColumn(O,"O",1.2);
AddColumn(H,"H",1.2);
AddColumn(L,"L",1.2);
AddColumn(C,"C",1.2);
AddColumn(TF,"TF",1.2);
AddColumn(IQF,"IQF",1.2);
AddColumn(IIf(T1,C,Null)  ," T1 "  ,6.2,1.2,colorGreen);
AddColumn(IIf(T2,C,Null)," T2 ",6.2,1.2,colorOrange);
 

extremist

Well-Known Member
dear coders

i reiterate tht this code which i am looking for is not abt any pattern exploration thingy! the logic is very clear and simple.

for a BEARISH SCENARIO:
1. previous candle (candle1) should be bullish candle (irrespective of the pattern).
2. candle2 should be bearish candle (irrespective of the pattern) in such a way that candle2 breaches high of candle1 and closes within the H-L range of candle1. also, it should give a negative close i.e. close<open

or a BULLISH SCENARIO:
1. previous candle (candle1) should be bearish candle (irrespective of the pattern).
2. candle2 should be bullish candle (irrespective of the pattern) in such a way that candle2 breaches low of candle1 and closes within the H-L range of candle1. also, it should give a positive close i.e. close>open

need your help forum!
can anybody help me on this?
the main post has screenshots regarding the same!
the code u needed will look like as the following code.
i actually added one extra condition to it . if u don't like tht plz mark those conditions as comment by placcing // prior to tht line

Code:
_N(Title = StrFormat("{{NAME}} -"+ EncodeColor(colorBlue)+""+ EncodeColor(colorBlue)+" {{INTERVAL}} "+ EncodeColor(colorWhite)+"{{DATE}} \n Op=> %g, \n Hi=> %g, \n Lo=> %g, \n Cl=> %g 
 {{VALUES}}", O, H, L, C  ));
Plot( C, "", ParamColor("Color", colorBlack ),  ParamStyle("Style",styleCandle,maskAll)  ); 

Sell=Ref(C,-1)>Ref(O,-1)		//previous candle bullish candle 
AND Ref(C,-1)>Ref(C,-2)		//previous candle closed abv it's prior candle
AND C<O 					//current candle bearish
AND Ref(H,-1)>C
AND C>Ref(L,-1)	                //current candle closes within the H-L range of previous candle
AND H>Ref(H,-1) ;			//current candle high crosses previous candle high


Buy=Ref(C,-1)<Ref(O,-1)	  //previous candle bearish candle
AND Ref(C,-1)<Ref(C,-2)    //previous candle closed bellow it's prior candle
AND C>O   			  //current candle bullish 
AND Ref(H,-1)>C
AND C>Ref(L,-1)	          //current candle closes within the H-L range of previous candle
AND L<Ref(L,-1) ;		  //current candle low crosses previous candle low



PlotShapes(Buy*shapeUpTriangle, colorBrightGreen, 0, C);
PlotShapes(Sell*shapeDownTriangle, colorRed, 0, C);
i pourpously keep the arrows at the close instead of offsetting those to low for buy and at high for sell.
the reason behind this is : it fools u.
placing arrows at closing price may look bad but it actually gives u clear picture of the trade to be happened.
Coz actually we trade after the candle close.

People may differ with my views.
but this suits me.
 
Last edited:

cellclinic

Well-Known Member
Re: Is It Possible ???

can any one help in adjusting this problem ???

Thanks for replying ... but unable to expand pic to view ... But what i am able to understand is to edit formula ... but i am unable to find plot grid option editing price option ...
_SECTION_BEGIN("Price1");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

Regards ...

Yes, it is possible. De-activate built-in grid via SetChartOptions and make a loop including PlotGrid().

See
 

Similar threads