[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Can´t find the cum value!!!!!!!!!!!!



PureBytes Links

Trading Reference Links




Jayson, Anthony and others,
 
I recently posted a question that I couldnīt find a 
cum value for a high (or low) value I found with my code 
(attached).
 
This question is posing a problem I canīt resolve 
on my own.
 
If anybody has an idea, please feel free to step 
in!
 
The code comes below. It pinpoints the high ad low 
values correctly. I now need their cum values.
 
I tried for instance 
 
Valuewhen(high=firstswingtop, cum(1),1)   
or
 
Iif (cum(1)>firstlinechangeup and 
cum(1)<firstlinechangedown and 
high=hhv(high,firstlinechangeup-firstlinechangedown),cum(1),0)
 
but neither works.
 
Thanks for your help!
 
Markus
 
- - - - - - - - - 
 

swingsize=5<FONT 
face="Courier New" color=#6600aa>;// could be any value of your choice
weeklyrange=(Ref<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#0000ff>HHV(<FONT 
face="Courier New" color=#000000>High<FONT face="Courier New" 
color=#6600aa>,swingsize),-<FONT face="Courier New" 
color=#ff00ff>1)-<FONT 
face="Courier New" color=#0000ff>Ref<FONT face="Courier New" 
color=#6600aa>(LLV<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#000000>Low<FONT face="Courier New" 
color=#6600aa>,swingsize),-<FONT face="Courier New" 
color=#ff00ff>1))*<FONT 
face="Courier New" color=#ff00ff>0.1<FONT face="Courier New" 
color=#6600aa>;
Thresholddown=Ref<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#0000ff>LLV(<FONT 
face="Courier New" color=#000000>Low<FONT face="Courier New" 
color=#6600aa>,swingsize),-<FONT face="Courier New" 
color=#ff00ff>1)-weeklyrange;
Thresholdup=Ref<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#0000ff>HHV(<FONT 
face="Courier New" color=#000000>High<FONT face="Courier New" 
color=#6600aa>,swingsize),-<FONT face="Courier New" 
color=#ff00ff>1)+weeklyrange;
Linechangeup=<FONT face="Courier New" 
color=#000000>High<FONT face="Courier New" 
color=#6600aa>>Thresholdup;
Linechangedown=<FONT face="Courier New" 
color=#000000>Low<FONT face="Courier New" 
color=#6600aa><thresholddown;
z=Linechangedown;
y=linechangeup;
firstlinechangedown=<FONT face="Courier New" 
color=#0000ff>LastValue<FONT face="Courier New" 
color=#6600aa>(<FONT face="Courier New" 
color=#0000ff>ValueWhen<FONT face="Courier New" 
color=#6600aa>(z,Cum<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#ff00ff>1),<FONT 
face="Courier New" color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>));
firstlinechangeup=<FONT face="Courier New" 
color=#0000ff>LastValue<FONT face="Courier New" 
color=#6600aa>(<FONT face="Courier New" 
color=#0000ff>ValueWhen<FONT face="Courier New" 
color=#6600aa>(y,Cum<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#ff00ff>1),<FONT 
face="Courier New" color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>));
firstswingtop=Ref<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#0000ff>HHV(<FONT 
face="Courier New" color=#000000>High<FONT face="Courier New" 
color=#6600aa>,(firstlinechangedown-firstlinechangeup)+<FONT 
face="Courier New" color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>),-(<FONT face="Courier New" 
color=#0000ff>LastValue<FONT face="Courier New" 
color=#6600aa>(Cum<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>))-firstlinechangedown));
secondlinechangedown=<FONT face="Courier New" 
color=#0000ff>LastValue<FONT face="Courier New" 
color=#6600aa>(<FONT face="Courier New" 
color=#0000ff>ValueWhen(z 
AND<FONT 
face="Courier New" color=#6600aa> <FONT face="Courier New" 
color=#0000ff>Cum(<FONT 
face="Courier New" color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>)<<FONT face="Courier New" 
color=#0000ff>LastValue<FONT face="Courier New" 
color=#6600aa>(firstlinechangeup),<FONT face="Courier New" 
color=#0000ff>Cum(<FONT 
face="Courier New" color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>),1<FONT 
face="Courier New" color=#6600aa>));
secondlinechangeup=<FONT face="Courier New" 
color=#0000ff>LastValue<FONT face="Courier New" 
color=#6600aa>(<FONT face="Courier New" 
color=#0000ff>ValueWhen(y 
AND<FONT 
face="Courier New" color=#6600aa> <FONT face="Courier New" 
color=#0000ff>Cum(<FONT 
face="Courier New" color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>)<<FONT face="Courier New" 
color=#0000ff>LastValue<FONT face="Courier New" 
color=#6600aa>(secondlinechangedown),<FONT face="Courier New" 
color=#0000ff>Cum(<FONT 
face="Courier New" color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>),1<FONT 
face="Courier New" color=#6600aa>));
firstswingbottom=<FONT face="Courier New" 
color=#0000ff>Ref(<FONT 
face="Courier New" color=#0000ff>LLV<FONT face="Courier New" 
color=#6600aa>(<FONT face="Courier New" 
color=#000000>Low<FONT face="Courier New" 
color=#6600aa>,(firstlinechangeup-secondlinechangedown)+<FONT 
face="Courier New" color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>),-(<FONT face="Courier New" 
color=#0000ff>LastValue<FONT face="Courier New" 
color=#6600aa>(Cum<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#ff00ff>1<FONT face="Courier New" 
color=#6600aa>))-firstlinechangeup));<FONT face="Courier New" 
color=#6600aa>
Filter<FONT face="Courier New" 
color=#6600aa>=firstlinechangedown>firstlinechangeup <FONT 
face="Courier New" color=#000000>AND<FONT face="Courier New" 
color=#6600aa> MA<FONT 
face="Courier New" color=#6600aa>(<FONT face="Courier New" 
color=#000000>Volume<FONT face="Courier New" 
color=#6600aa>,50<FONT 
face="Courier New" color=#6600aa>)>=<FONT face="Courier New" 
color=#ff00ff>20000<FONT face="Courier New" 
color=#6600aa>;<FONT 
face="Courier New" color=#0000ff>
AddColumn(<FONT 
face="Courier New" color=#0000ff>Cum<FONT face="Courier New" 
color=#6600aa>(1<FONT 
face="Courier New" color=#6600aa>), <FONT face="Courier New" 
color=#ff00ff>"total bars"<FONT face="Courier New" 
color=#6600aa>,1.0<FONT 
face="Courier New" color=#6600aa>);<FONT face="Courier New" 
color=#0000ff>
AddColumn<FONT face="Courier New" 
color=#6600aa>(firstswingtop,"1. 
swing top",<FONT 
face="Courier New" color=#ff00ff>1.2<FONT face="Courier New" 
color=#6600aa>);
AddColumn<FONT face="Courier New" 
color=#6600aa>(firstlinechangeup,<FONT face="Courier New" 
color=#ff00ff>"1dlcup"<FONT face="Courier New" 
color=#6600aa>,1.1<FONT 
face="Courier New" color=#6600aa>);<FONT face="Courier New" 
color=#0000ff>
AddColumn<FONT face="Courier New" 
color=#6600aa>(firstlinechangedown,<FONT face="Courier New" 
color=#ff00ff>"1dlcdown"<FONT face="Courier New" 
color=#6600aa>,1.1<FONT 
face="Courier New" color=#6600aa>);<FONT face="Courier New" 
color=#0000ff>
AddColumn<FONT face="Courier New" 
color=#6600aa>(firstswingbottom,<FONT face="Courier New" 
color=#ff00ff>"1. swing bottom"<FONT face="Courier New" 
color=#6600aa>,1.2<FONT 
face="Courier New" 
color=#6600aa>);






Yahoo! Groups Sponsor


  ADVERTISEMENT









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.