| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #9 | ||
![]() | Re: Error Code Help Please Quote:
don't just say "I found it". For the benefit of all, and as a courtesy, post a link of your find. | ||
| |
|
| | #10 | ||
![]() | Re: Error Code Help Please is this the vidya you were looking for function "VIDYA" Code: Inputs: Price( NumericSeries ), Period( NumericSimple ), Smoothing( NumericSimple ); Variables: absCMO, SC; absCMO = Abs( CMO( Price, Period ) ) / 100; SC = 2 / ( Smoothing + 1 ); If Currentbar > 1 And IsValid( VIDYA[1] ) Then VIDYA = ( SC * absCMO * Price ) + ( 1 - ( SC * absCMO ) ) * VIDYA[1] Else VIDYA = Price; Code: Inputs: Price( NumericSeries ), Period( NumericSimple ); Variables: priceToday, pricePrev, sumUp, sumDown, i; sumUp = 0; sumDown = 0; For i = 0 To Period - 1 Begin priceToday = Price[i]; pricePrev = Price[i+1]; If priceToday > pricePrev Then sumUp = sumUp + ( priceToday - pricePrev ) Else If priceToday < pricePrev Then sumDown = sumDown + ( pricePrev - priceToday ); End; If sumUp = 0 Then CMO = -100 Else If sumDown = 0 Then CMO = 100 Else If sumUp <> sumDown Then CMO = 100 * ( ( sumUp - sumDown ) / ( sumUp + sumDown ) ) Else CMO = 0; Code: inputs: Price ( Close ),
Period ( 14 ),
Smoothing( 4 );
variables: myVIDYA(0);
myVIDYA = VIDYA( Price, Period, Smoothing );
plot1( myVIDYA,"VIDYA" ); Last edited by flyingdutchmen; 05-24-2009 at 03:34 PM. | ||
| |
|
| The Following User Says Thank You to flyingdutchmen For This Useful Post: | ||
emptyvault (07-19-2009) | ||
| | #11 | ||
![]() | Re: Error Code Help Please sorry if you feel it is improper to do so . | ||
| |
|
![]() |
| Tags |
| cmo |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Web Site Rendering Error | Spydertrader | Support Center | 3 | 05-13-2009 10:29 PM |
| Error when Retrieving PMs | brownsfan019 | Support Center | 4 | 04-21-2009 11:16 PM |
| Easylanguage Error #408 and #410?? | isisisis | Coding Forum | 2 | 04-10-2009 06:30 PM |
| Future Data Error in TS Indicator | blib | Coding Forum | 6 | 04-05-2009 04:09 PM |
| Url.dll Error - Help! | brownsfan019 | Tools of the Trade | 5 | 09-16-2008 05:50 PM |