![]() |
|
|||||||
| Questions and Issues This is the place to post your comments if you have any questions or issues regarding Vitamin-C for MetaStock |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Good morning
i have two questions about Vitamin_c first one: is it possible to obtain, as in metastock, the display of two different arrays with the same indicator? second one: is it possible to do in the same program something like that: void indicator_one() //first indicator to display for(int i=0;i<BarCount;i++) { ................... big process ............... Result[i]=........ number_one=... } void indicator_two() //second indicator to display for(int i=0;i<BarCount;i++) { ................... other process ............... Result[i]=........ if (number_one==...) { number_two=... } } regards |
|
#2
|
|||
|
|||
|
It can't remember statically allocated variables between calls because each time a Vitamin-C function is called the Vitamin-C engine is reinitialized.
What you could do is combine everything in one function using a switch statement etc and depending on a certain constant value passed to the function different results are returned. An example of this is the trailing stop indicator on page 60 of the User Manual which returns a band or trigger depending on the _mode parameter.
__________________
Compuvision Australia Pty Ltd. Power Tools for Metastock users. http://www.compuvision.com.au |
|
#3
|
|||
|
|||
|
ok i see what you mean.
but you have not answer to my first question: is it possible to return two different arrays with only one indicator? regards |
|
#4
|
|||
|
|||
|
You can only return one array which is the predefined Result array.
To return more than one array you have to make multiple calls to return different arrays. This would be no different than if you had of written an external DLL using the MDK.
__________________
Compuvision Australia Pty Ltd. Power Tools for Metastock users. http://www.compuvision.com.au |
|
#5
|
|||
|
|||
|
ok, thank you for your explanations.
it would be nice if it was possible in a future version. Actually, by example, if i want to display a indicator green if it is positif and red if it is negatif, it's a little pity to do two twice the same calculation. regards |
![]() |
| Thread Tools | |
| Display Modes | |
|
|