Australian (ASX) Stock Market Forum

Amibroker FAQ

AE, nope. Works as advertised. I don't know what is wrong with your setup but here are two charts showing the result of the "x, y" code. The lows shown in red are identical. Note that when the cursor is to the right of the first red bar its appropriate values are indicated and when it is to the left of the first red bar the values for the 2nd red bar are shown. I think that takes care of things. Good luck.
 

Attachments

  • 1st L.jpg
    1st L.jpg
    61.3 KB · Views: 8
  • 2nd L.jpg
    2nd L.jpg
    58.7 KB · Views: 4
Not for me it doesn't. And I've tried it on 2 different computers with the same results.

Could you please run this as an exploration over your whole database, with "n last days" set to 1 and see what results you get. I get many stocks showing results well over 100!


x = LLV( L, 100 );
y = BarsSince( L == x );//does not include current bar

AddColumn( y,"Bars",1.0);

Filter = 1;
 
In Explore, with n last days = 1 running the code on the chart the LLV and BarsSince values are the same as those shown on the chart.
 
In Explore, with n last days = 1 running the code on the chart the LLV and BarsSince values are the same as those shown on the chart.

For that one particular chart, yes. But what about other charts? I can find many stocks that give the correct values with your formula too, but I can also find many others where it doesn't. Do you have end-of-day data for the ASX so we can compare results for identical charts? If not, how about some international indexes, end-of-day data? See below international index data exploration.
 

Attachments

  • example.jpg
    example.jpg
    83.8 KB · Views: 2
Just to clarify, yes the values on my chart also match the values in the exploration. My point is that for some securities, the bars value (ie. "y") shows as above 100 (refer above screen capture). I'm trying to find the bars since the lowest low of the last 100 days, and by definition that can not possibly be more than 100 days ago, yet the exploration can find some securities where "y" is in fact greater than 100.
 
What's going on? What's the correct way to do this?

thanks

If the Lowest Low value is the same, then the most recent Low is used.

PHP:
x = LLV( L, 100 );
y = BarsSince( L == x );

AddColumn( IIf(y < 100, y, 0),"Bars",1.0);

Filter = 1;
 
Hi,

Is it possible to change the thickness of the "open" and "close" in the bar charts in Amibroker? I know you can change the thickness of the bar itself but I want the open and close a little thicker.

Thanks.

Quinn
 
Anyones help would be greatly appreciated.
How do I make the following RSI zero based...Thanks
_SECTION_BEGIN("RSI");
SetChartOptions(0,0,chartGrid30|chartGrid70);
periods = Param( "Periods", 15, 1, 200, 1 );
Plot( RSI( periods), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
 
Hi xyz --

What does being "zero based" mean in this context?

I see the param statement will try to compute RSI with a length as low as 1. That is not defined. 2 is the minimum length for which the RSI calculations have meaning.

Thanks,
Howard
 
Hello guys, first time poster here

I have made a H1 exploration for Forex to show the hourly range of each daily hour (0,1,2,3,4, .... 22,23) of a period of days (e.g Sept 25 to Sept 29) or all quotes of a data base.

But the problem is that the exploration only outputs the hourly ranges of the last day of that range of days and it outputs those same ranges to all days of the range of days. In addition to that in the Date/Time column it outputs each hour of each day, too, although I have already set the hours of a day horizontally. So I only want one data set for each day of the vertical column "Date/Time"

OK here is a picture of the AA when using my code http://img830.imageshack.us/img830/9411/20101001213436.png

and also there is the code below.

Maybe there also is a more simple way for such a code in contrast to my one.

Code:
_SECTION_BEGIN("H1 Range Exploration");

TicDiv= Param("Tic or PIP value",0.0001,0.0001,0.01,0.01);

TimeFrameSet(inHourly);

T0 = 000000; 
T1 = 010000;
T2 = 020000;
T3 = 030000; 
T4 = 040000; 
T5 = 050000;
T6 = 060000; 
T7 = 070000;
T8 = 080000;
T9 = 090000;
T10 = 100000;
T11 = 110000;
T12 = 120000;
T13 = 130000;
T14 = 140000;
T15 = 150000;
T16 = 160000;
T17 = 170000;
T18 = 180000;
T19 = 190000;
T20 = 200000;
T21 = 210000;
T22 = 220000;
T23 = 230000;


H0 = ValueWhen(T0 == TimeNum(),H); 
Hl = ValueWhen(T1 == TimeNum(),H); 
H2 = ValueWhen(T2 == TimeNum(),H); 
H3 = ValueWhen(T3 == TimeNum(),H); 
H4 = ValueWhen(T4 == TimeNum(),H); 
H5 = ValueWhen(T5 == TimeNum(),H); 
H6 = ValueWhen(T6 == TimeNum(),H); 
H7 = ValueWhen(T7 == TimeNum(),H);
H8 = ValueWhen(T8 == TimeNum(),H); 
H9 = ValueWhen(T9 == TimeNum(),H); 
Hl0 = ValueWhen(T10 == TimeNum(),H); 
Hl1 = ValueWhen(T11 == TimeNum(),H);
Hl2 = ValueWhen(T12 == TimeNum(),H); 
Hl3 = ValueWhen(T13 == TimeNum(),H); 
Hl4 = ValueWhen(T14 == TimeNum(),H); 
Hl5 = ValueWhen(T15 == TimeNum(),H); 
Hl6 = ValueWhen(T16 == TimeNum(),H); 
Hl7 = ValueWhen(T17 == TimeNum(),H); 
Hl8 = ValueWhen(T18 == TimeNum(),H); 
Hl9 = ValueWhen(T19 == TimeNum(),H);
H20 = ValueWhen(T20 == TimeNum(),H); 
H2l = ValueWhen(T21 == TimeNum(),H); 
H22 = ValueWhen(T22 == TimeNum(),H); 
H23 = ValueWhen(T23 == TimeNum(),H);

L0 = ValueWhen(T0 == TimeNum(),L); 
Ll = ValueWhen(T1 == TimeNum(),L); 
L2 = ValueWhen(T2 == TimeNum(),L); 
L3 = ValueWhen(T3 == TimeNum(),L); 
L4 = ValueWhen(T4 == TimeNum(),L); 
L5 = ValueWhen(T5 == TimeNum(),L); 
L6 = ValueWhen(T6 == TimeNum(),L); 
L7 = ValueWhen(T7 == TimeNum(),L);
L8 = ValueWhen(T8 == TimeNum(),L); 
L9 = ValueWhen(T9 == TimeNum(),L); 
Ll0 = ValueWhen(T10 == TimeNum(),L); 
Ll1 = ValueWhen(T11 == TimeNum(),L);
Ll2 = ValueWhen(T12 == TimeNum(),L); 
Ll3 = ValueWhen(T13 == TimeNum(),L); 
Ll4 = ValueWhen(T14 == TimeNum(),L); 
Ll5 = ValueWhen(T15 == TimeNum(),L); 
Ll6 = ValueWhen(T16 == TimeNum(),L); 
Ll7 = ValueWhen(T17 == TimeNum(),L); 
Ll8 = ValueWhen(T18 == TimeNum(),L); 
Ll9 = ValueWhen(T19 == TimeNum(),L);
L20 = ValueWhen(T20 == TimeNum(),L); 
L2l = ValueWhen(T21 == TimeNum(),L); 
L22 = ValueWhen(T22 == TimeNum(),L); 
L23 = ValueWhen(T23 == TimeNum(),L);


R0 = StrToNum(NumToStr(round((H0 - L0)/TicDiv), 4.4));
R1 = StrToNum(NumToStr(round((Hl - Ll)/TicDiv), 4.4));
R2 = StrToNum(NumToStr(round((H2 - L2)/TicDiv), 4.4));
R3 = StrToNum(NumToStr(round((H3 - L3)/TicDiv), 4.4));
R4 = StrToNum(NumToStr(round((H4 - L4)/TicDiv), 4.4));
R5 = StrToNum(NumToStr(round((H5 - L5)/TicDiv), 4.4));
R6 = StrToNum(NumToStr(round((H6 - L6)/TicDiv), 4.4));
R7 = StrToNum(NumToStr(round((H7 - L7)/TicDiv), 4.4));
R8 = StrToNum(NumToStr(round((H8 - L8)/TicDiv), 4.4));
R9 = StrToNum(NumToStr(round((H9 - L9)/TicDiv), 4.4));
R10 = StrToNum(NumToStr(round((Hl0 - Ll0)/TicDiv), 4.4));
R11 = StrToNum(NumToStr(round((Hl1 - Ll1)/TicDiv), 4.4));
R12 = StrToNum(NumToStr(round((Hl2 - Ll2)/TicDiv), 4.4));
R13 = StrToNum(NumToStr(round((Hl3 - Ll3)/TicDiv), 4.4));
R14 = StrToNum(NumToStr(round((Hl4 - Ll4)/TicDiv), 4.4));
R15 = StrToNum(NumToStr(round((Hl5 - Ll5)/TicDiv), 4.4));
R16 = StrToNum(NumToStr(round((Hl6 - Ll6)/TicDiv), 4.4));
R17 = StrToNum(NumToStr(round((Hl7 - Ll7)/TicDiv), 4.4));
R18 = StrToNum(NumToStr(round((Hl8 - Ll8)/TicDiv), 4.4));
R19 = StrToNum(NumToStr(round((Hl9 - Ll9)/TicDiv), 4.4));
R20 = StrToNum(NumToStr(round((H20 - L20)/TicDiv), 4.4));
R21 = StrToNum(NumToStr(round((H2l - L2l)/TicDiv), 4.4));
R22 = StrToNum(NumToStr(round((H22 - L22)/TicDiv), 4.4));
R23 = StrToNum(NumToStr(round((H23 - L23)/TicDiv), 4.4));

TimeFrameRestore();

Filter =1;


AddColumn(R0,"00:00", 1.0, colorDefault, IIf(R0<15, colorRed, IIf(R0<18, colorOrange, IIf(R0<22, colorLightOrange,IIf(R0<25, colorBrightGreen,colorDefault)))));
AddColumn(R1,"01:00", 1.0, colorDefault, IIf(R1<15, colorRed, IIf(R1<18, colorOrange, IIf(R1<22, colorLightOrange,IIf(R1<25, colorBrightGreen,colorDefault)))));
AddColumn(R2,"02:00", 1.0, colorDefault, IIf(R2<15, colorRed, IIf(R2<18, colorOrange, IIf(R2<22, colorLightOrange,IIf(R2<25, colorBrightGreen,colorDefault)))));
AddColumn(R3,"03:00", 1.0, colorDefault, IIf(R3<15, colorRed, IIf(R3<18, colorOrange, IIf(R3<22, colorLightOrange,IIf(R3<25, colorBrightGreen,colorDefault)))));
AddColumn(R4,"04:00", 1.0, colorDefault, IIf(R4<15, colorRed, IIf(R4<18, colorOrange, IIf(R4<22, colorLightOrange,IIf(R4<25, colorBrightGreen,colorDefault)))));
AddColumn(R5,"05:00", 1.0, colorDefault, IIf(R5<15, colorRed, IIf(R5<18, colorOrange, IIf(R5<22, colorLightOrange,IIf(R5<25, colorBrightGreen,colorDefault)))));
AddColumn(R6,"06:00", 1.0, colorDefault, IIf(R6<15, colorRed, IIf(R6<18, colorOrange, IIf(R6<22, colorLightOrange,IIf(R6<25, colorBrightGreen,colorDefault)))));
AddColumn(R7,"07:00", 1.0, colorDefault, IIf(R7<15, colorRed, IIf(R7<18, colorOrange, IIf(R7<22, colorLightOrange,IIf(R7<25, colorBrightGreen,colorDefault)))));
AddColumn(R8,"08:00", 1.0, colorDefault, IIf(R8<15, colorRed, IIf(R8<18, colorOrange, IIf(R8<22, colorLightOrange,IIf(R8<25, colorBrightGreen,colorDefault)))));
AddColumn(R9,"09:00", 1.0, colorDefault, IIf(R9<15, colorRed, IIf(R9<18, colorOrange, IIf(R9<22, colorLightOrange,IIf(R9<25, colorBrightGreen,colorDefault)))));
AddColumn(R10,"10:00", 1.0, colorDefault, IIf(R10<15, colorRed, IIf(R10<18, colorOrange, IIf(R10<22, colorLightOrange,IIf(R10<25, colorBrightGreen,colorDefault)))));
AddColumn(R11,"11:00", 1.0, colorDefault, IIf(R11<15, colorRed, IIf(R11<18, colorOrange, IIf(R11<22, colorLightOrange,IIf(R11<25, colorBrightGreen,colorDefault)))));
AddColumn(R12,"12:00", 1.0, colorDefault, IIf(R12<15, colorRed, IIf(R12<18, colorOrange, IIf(R12<22, colorLightOrange,IIf(R12<25, colorBrightGreen,colorDefault)))));
AddColumn(R13,"13:00", 1.0, colorDefault, IIf(R13<15, colorRed, IIf(R13<18, colorOrange, IIf(R13<22, colorLightOrange,IIf(R13<25, colorBrightGreen,colorDefault)))));
AddColumn(R14,"14:00", 1.0, colorDefault, IIf(R14<15, colorRed, IIf(R14<18, colorOrange, IIf(R14<22, colorLightOrange,IIf(R14<25, colorBrightGreen,colorDefault)))));
AddColumn(R15,"15:00", 1.0, colorDefault, IIf(R15<15, colorRed, IIf(R15<18, colorOrange, IIf(R15<22, colorLightOrange,IIf(R15<25, colorBrightGreen,colorDefault)))));
AddColumn(R16,"16:00", 1.0, colorDefault, IIf(R16<15, colorRed, IIf(R16<18, colorOrange, IIf(R16<22, colorLightOrange,IIf(R16<25, colorBrightGreen,colorDefault)))));
AddColumn(R17,"17:00", 1.0, colorDefault, IIf(R17<15, colorRed, IIf(R17<18, colorOrange, IIf(R17<22, colorLightOrange,IIf(R17<25, colorBrightGreen,colorDefault)))));
AddColumn(R18,"18:00", 1.0, colorDefault, IIf(R18<15, colorRed, IIf(R18<18, colorOrange, IIf(R18<22, colorLightOrange,IIf(R18<25, colorBrightGreen,colorDefault)))));
AddColumn(R19,"19:00", 1.0, colorDefault, IIf(R19<15, colorRed, IIf(R19<18, colorOrange, IIf(R19<22, colorLightOrange,IIf(R19<25, colorBrightGreen,colorDefault)))));
AddColumn(R20,"20:00", 1.0, colorDefault, IIf(R20<15, colorRed, IIf(R20<18, colorOrange, IIf(R20<22, colorLightOrange,IIf(R20<25, colorBrightGreen,colorDefault)))));
AddColumn(R21,"21:00", 1.0, colorDefault, IIf(R21<15, colorRed, IIf(R21<18, colorOrange, IIf(R21<22, colorLightOrange,IIf(R21<25, colorBrightGreen,colorDefault)))));
AddColumn(R22,"22:00", 1.0, colorDefault, IIf(R22<15, colorRed, IIf(R22<18, colorOrange, IIf(R22<22, colorLightOrange,IIf(R22<25, colorBrightGreen,colorDefault)))));
AddColumn(R23,"23:00", 1.0, colorDefault, IIf(R23<15, colorRed, IIf(R23<18, colorOrange, IIf(R23<22, colorLightOrange,IIf(R23<25, colorBrightGreen,colorDefault)))));
_SECTION_END();

Could you please help to find a solution. Hope you understand my problem

Thank you!

Kind regards
 
Ok, I got one problem solved. :)

The only problem being left is how to get only one data set for each day.

This is how it's looking now http://img529.imageshack.us/img529/4820/20101002130312.png

New code

Code:
_SECTION_BEGIN("H1 Range Exploration");

TicDiv= Param("Tic or PIP value",0.0001,0.0001,0.01,0.01);

TimeFrameSet(inHourly);

T0 = 000000; 
T1 = 010000;
T2 = 020000;
T3 = 030000; 
T4 = 040000; 
T5 = 050000;
T6 = 060000; 
T7 = 070000;
T8 = 080000;
T9 = 090000;
T10 = 100000;
T11 = 110000;
T12 = 120000;
T13 = 130000;
T14 = 140000;
T15 = 150000;
T16 = 160000;
T17 = 170000;
T18 = 180000;
T19 = 190000;
T20 = 200000;
T21 = 210000;
T22 = 220000;
T23 = 230000;


H0 = ValueWhen(T0 == TimeNum(),H); 
Hl = ValueWhen(T1 == TimeNum(),H); 
H2 = ValueWhen(T2 == TimeNum(),H); 
H3 = ValueWhen(T3 == TimeNum(),H); 
H4 = ValueWhen(T4 == TimeNum(),H); 
H5 = ValueWhen(T5 == TimeNum(),H); 
H6 = ValueWhen(T6 == TimeNum(),H); 
H7 = ValueWhen(T7 == TimeNum(),H);
H8 = ValueWhen(T8 == TimeNum(),H); 
H9 = ValueWhen(T9 == TimeNum(),H); 
Hl0 = ValueWhen(T10 == TimeNum(),H); 
Hl1 = ValueWhen(T11 == TimeNum(),H);
Hl2 = ValueWhen(T12 == TimeNum(),H); 
Hl3 = ValueWhen(T13 == TimeNum(),H); 
Hl4 = ValueWhen(T14 == TimeNum(),H); 
Hl5 = ValueWhen(T15 == TimeNum(),H); 
Hl6 = ValueWhen(T16 == TimeNum(),H); 
Hl7 = ValueWhen(T17 == TimeNum(),H); 
Hl8 = ValueWhen(T18 == TimeNum(),H); 
Hl9 = ValueWhen(T19 == TimeNum(),H);
H20 = ValueWhen(T20 == TimeNum(),H); 
H2l = ValueWhen(T21 == TimeNum(),H); 
H22 = ValueWhen(T22 == TimeNum(),H); 
H23 = ValueWhen(T23 == TimeNum(),H);

L0 = ValueWhen(T0 == TimeNum(),L); 
Ll = ValueWhen(T1 == TimeNum(),L); 
L2 = ValueWhen(T2 == TimeNum(),L); 
L3 = ValueWhen(T3 == TimeNum(),L); 
L4 = ValueWhen(T4 == TimeNum(),L); 
L5 = ValueWhen(T5 == TimeNum(),L); 
L6 = ValueWhen(T6 == TimeNum(),L); 
L7 = ValueWhen(T7 == TimeNum(),L);
L8 = ValueWhen(T8 == TimeNum(),L); 
L9 = ValueWhen(T9 == TimeNum(),L); 
Ll0 = ValueWhen(T10 == TimeNum(),L); 
Ll1 = ValueWhen(T11 == TimeNum(),L);
Ll2 = ValueWhen(T12 == TimeNum(),L); 
Ll3 = ValueWhen(T13 == TimeNum(),L); 
Ll4 = ValueWhen(T14 == TimeNum(),L); 
Ll5 = ValueWhen(T15 == TimeNum(),L); 
Ll6 = ValueWhen(T16 == TimeNum(),L); 
Ll7 = ValueWhen(T17 == TimeNum(),L); 
Ll8 = ValueWhen(T18 == TimeNum(),L); 
Ll9 = ValueWhen(T19 == TimeNum(),L);
L20 = ValueWhen(T20 == TimeNum(),L); 
L2l = ValueWhen(T21 == TimeNum(),L); 
L22 = ValueWhen(T22 == TimeNum(),L); 
L23 = ValueWhen(T23 == TimeNum(),L);


R0 = round((H0 - L0)/TicDiv);
R1 = round((Hl - Ll)/TicDiv);
R2 = round((H2 - L2)/TicDiv);
R3 = round((H3 - L3)/TicDiv);
R4 = round((H4 - L4)/TicDiv);
R5 = round((H5 - L5)/TicDiv);
R6 = round((H6 - L6)/TicDiv);
R7 = round((H7 - L7)/TicDiv);
R8 = round((H8 - L8)/TicDiv);
R9 = round((H9 - L9)/TicDiv);
R10 = round((Hl0 - Ll0)/TicDiv);
R11 = round((Hl1 - Ll1)/TicDiv);
R12 = round((Hl2 - Ll2)/TicDiv);
R13 = round((Hl3 - Ll3)/TicDiv);
R14 = round((Hl4 - Ll4)/TicDiv);
R15 = round((Hl5 - Ll5)/TicDiv);
R16 = round((Hl6 - Ll6)/TicDiv);
R17 = round((Hl7 - Ll7)/TicDiv);
R18 = round((Hl8 - Ll8)/TicDiv);
R19 = round((Hl9 - Ll9)/TicDiv);
R20 = round((H20 - L20)/TicDiv);
R21 = round((H2l - L2l)/TicDiv);
R22 = round((H22 - L22)/TicDiv);
R23 = round((H23 - L23)/TicDiv);

TimeFrameRestore();

Filter = 1;

AddColumn(R0,"00:00", 1.0, colorDefault, IIf(R0<15, colorRed, IIf(R0<18, colorOrange, IIf(R0<22, colorLightOrange,IIf(R0<25, colorBrightGreen,IIf(R0<40, colorDarkGreen,IIf(R0<50, ColorRGB(0,64,128),IIf(R0<60, colorLightBlue,colorDefault))))))));
AddColumn(R1,"01:00", 1.0, colorDefault, IIf(R1<15, colorRed, IIf(R1<18, colorOrange, IIf(R1<22, colorLightOrange,IIf(R1<25, colorBrightGreen,IIf(R1<40, colorDarkGreen,IIf(R1<50, ColorRGB(0,64,128),IIf(R1<60, colorLightBlue,colorDefault))))))));
AddColumn(R2,"02:00", 1.0, colorDefault, IIf(R2<15, colorRed, IIf(R2<18, colorOrange, IIf(R2<22, colorLightOrange,IIf(R2<25, colorBrightGreen,IIf(R2<40, colorDarkGreen,IIf(R2<50, ColorRGB(0,64,128),IIf(R2<60, colorLightBlue,colorDefault))))))));
AddColumn(R3,"03:00", 1.0, colorDefault, IIf(R3<15, colorRed, IIf(R3<18, colorOrange, IIf(R3<22, colorLightOrange,IIf(R3<25, colorBrightGreen,IIf(R3<40, colorDarkGreen,IIf(R3<50, ColorRGB(0,64,128),IIf(R3<60, colorLightBlue,colorDefault))))))));
AddColumn(R4,"04:00", 1.0, colorDefault, IIf(R4<15, colorRed, IIf(R4<18, colorOrange, IIf(R4<22, colorLightOrange,IIf(R4<25, colorBrightGreen,IIf(R4<40, colorDarkGreen,IIf(R4<50, ColorRGB(0,64,128),IIf(R4<60, colorLightBlue,colorDefault))))))));
AddColumn(R5,"05:00", 1.0, colorDefault, IIf(R5<15, colorRed, IIf(R5<18, colorOrange, IIf(R5<22, colorLightOrange,IIf(R5<25, colorBrightGreen,IIf(R5<40, colorDarkGreen,IIf(R5<50, ColorRGB(0,64,128),IIf(R5<60, colorLightBlue,colorDefault))))))));
AddColumn(R6,"06:00", 1.0, colorDefault, IIf(R6<15, colorRed, IIf(R6<18, colorOrange, IIf(R6<22, colorLightOrange,IIf(R6<25, colorBrightGreen,IIf(R6<40, colorDarkGreen,IIf(R6<50, ColorRGB(0,64,128),IIf(R6<60, colorLightBlue,colorDefault))))))));
AddColumn(R7,"07:00", 1.0, colorDefault, IIf(R7<15, colorRed, IIf(R7<18, colorOrange, IIf(R7<22, colorLightOrange,IIf(R7<25, colorBrightGreen,IIf(R7<40, colorDarkGreen,IIf(R7<50, ColorRGB(0,64,128),IIf(R7<60, colorLightBlue,colorDefault))))))));
AddColumn(R8,"08:00", 1.0, colorDefault, IIf(R8<15, colorRed, IIf(R8<18, colorOrange, IIf(R8<22, colorLightOrange,IIf(R8<25, colorBrightGreen,IIf(R8<40, colorDarkGreen,IIf(R8<50, ColorRGB(0,64,128),IIf(R8<60, colorLightBlue,colorDefault))))))));
AddColumn(R9,"09:00", 1.0, colorDefault, IIf(R9<15, colorRed, IIf(R9<18, colorOrange, IIf(R9<22, colorLightOrange,IIf(R9<25, colorBrightGreen,IIf(R9<40, colorDarkGreen,IIf(R9<50, ColorRGB(0,64,128),IIf(R9<60, colorLightBlue,colorDefault))))))));
AddColumn(R10,"10:00", 1.0, colorDefault, IIf(R10<15, colorRed, IIf(R10<18, colorOrange, IIf(R10<22, colorLightOrange,IIf(R10<25, colorBrightGreen,IIf(R10<40, colorDarkGreen,IIf(R10<50, ColorRGB(0,64,128),IIf(R10<60, colorLightBlue,colorDefault))))))));
AddColumn(R11,"11:00", 1.0, colorDefault, IIf(R11<15, colorRed, IIf(R11<18, colorOrange, IIf(R11<22, colorLightOrange,IIf(R11<25, colorBrightGreen,IIf(R11<40, colorDarkGreen,IIf(R11<50, ColorRGB(0,64,128),IIf(R11<60, colorLightBlue,colorDefault))))))));
AddColumn(R12,"12:00", 1.0, colorDefault, IIf(R12<15, colorRed, IIf(R12<18, colorOrange, IIf(R12<22, colorLightOrange,IIf(R12<25, colorBrightGreen,IIf(R12<40, colorDarkGreen,IIf(R12<50, ColorRGB(0,64,128),IIf(R12<60, colorLightBlue,colorDefault))))))));
AddColumn(R13,"13:00", 1.0, colorDefault, IIf(R13<15, colorRed, IIf(R13<18, colorOrange, IIf(R13<22, colorLightOrange,IIf(R13<25, colorBrightGreen,IIf(R13<40, colorDarkGreen,IIf(R13<50, ColorRGB(0,64,128),IIf(R13<60, colorLightBlue,colorDefault))))))));
AddColumn(R14,"14:00", 1.0, colorDefault, IIf(R14<15, colorRed, IIf(R14<18, colorOrange, IIf(R14<22, colorLightOrange,IIf(R14<25, colorBrightGreen,IIf(R14<40, colorDarkGreen,IIf(R14<50, ColorRGB(0,64,128),IIf(R14<60, colorLightBlue,colorDefault))))))));
AddColumn(R15,"15:00", 1.0, colorDefault, IIf(R15<15, colorRed, IIf(R15<18, colorOrange, IIf(R15<22, colorLightOrange,IIf(R15<25, colorBrightGreen,IIf(R15<40, colorDarkGreen,IIf(R15<50, ColorRGB(0,64,128),IIf(R15<60, colorLightBlue,colorDefault))))))));
AddColumn(R16,"16:00", 1.0, colorDefault, IIf(R16<15, colorRed, IIf(R16<18, colorOrange, IIf(R16<22, colorLightOrange,IIf(R16<25, colorBrightGreen,IIf(R16<40, colorDarkGreen,IIf(R16<50, ColorRGB(0,64,128),IIf(R16<60, colorLightBlue,colorDefault))))))));
AddColumn(R17,"17:00", 1.0, colorDefault, IIf(R17<15, colorRed, IIf(R17<18, colorOrange, IIf(R17<22, colorLightOrange,IIf(R17<25, colorBrightGreen,IIf(R17<40, colorDarkGreen,IIf(R17<50, ColorRGB(0,64,128),IIf(R17<60, colorLightBlue,colorDefault))))))));
AddColumn(R18,"18:00", 1.0, colorDefault, IIf(R18<15, colorRed, IIf(R18<18, colorOrange, IIf(R18<22, colorLightOrange,IIf(R18<25, colorBrightGreen,IIf(R18<40, colorDarkGreen,IIf(R18<50, ColorRGB(0,64,128),IIf(R18<60, colorLightBlue,colorDefault))))))));
AddColumn(R19,"19:00", 1.0, colorDefault, IIf(R19<15, colorRed, IIf(R19<18, colorOrange, IIf(R19<22, colorLightOrange,IIf(R19<25, colorBrightGreen,IIf(R19<40, colorDarkGreen,IIf(R19<50, ColorRGB(0,64,128),IIf(R19<60, colorLightBlue,colorDefault))))))));
AddColumn(R20,"20:00", 1.0, colorDefault, IIf(R20<15, colorRed, IIf(R20<18, colorOrange, IIf(R20<22, colorLightOrange,IIf(R20<25, colorBrightGreen,IIf(R20<40, colorDarkGreen,IIf(R20<50, ColorRGB(0,64,128),IIf(R20<60, colorLightBlue,colorDefault))))))));
AddColumn(R21,"21:00", 1.0, colorDefault, IIf(R21<15, colorRed, IIf(R21<18, colorOrange, IIf(R21<22, colorLightOrange,IIf(R21<25, colorBrightGreen,IIf(R21<40, colorDarkGreen,IIf(R21<50, ColorRGB(0,64,128),IIf(R21<60, colorLightBlue,colorDefault))))))));
AddColumn(R22,"22:00", 1.0, colorDefault, IIf(R22<15, colorRed, IIf(R22<18, colorOrange, IIf(R22<22, colorLightOrange,IIf(R22<25, colorBrightGreen,IIf(R22<40, colorDarkGreen,IIf(R22<50, ColorRGB(0,64,128),IIf(R22<60, colorLightBlue,colorDefault))))))));
AddColumn(R23,"23:00", 1.0, colorDefault, IIf(R23<15, colorRed, IIf(R23<18, colorOrange, IIf(R23<22, colorLightOrange,IIf(R23<25, colorBrightGreen,IIf(R23<40, colorDarkGreen,IIf(R23<50, ColorRGB(0,64,128),IIf(R23<60, colorLightBlue,colorDefault))))))));
_SECTION_END();
 
Ok, I have found a solution by myself. I'm not fully happy with it but quiet a bit.

Code:
Filter = TimeNum() == 220000;

If anyone finds a better solution don't hesitate to provide one. ;-)
 

Attachments

  • Expl.png
    Expl.png
    57.6 KB · Views: 21
Is it possible to pass in or fetch the Sector values for companies without having to manually enter them in?
 
...I don't know what is wrong with your setup but here are two charts showing the result of the "x, y" code....
HI colion,
Simple question I hope, what setting get's Amibroker to display price with the ohlc like that?

Cheers,
JB
 
Hi all,
Does anyone know why the below does not generate a Buy signal?

Buy = IIf(Cond1 && Cond2 && Cond3, True, False);

I've tried other variants as below but all to no avail.
If I just set Buy = True; that works.

If I do "WriteIf(Buy, "Buy", "Sell")" it prints Buy (when it should) but it never generates a Buy signal when I do a scan.

Buy = Cond1 && Cond2 && Cond3;
Buy = Cond1 AND Cond2 AND Cond3;

TIA,

JB:confused:
 
Top