The indicator I want will present me with a plot showing the efficiency of the current candle in relation to the previous candle. The efficiency is worked out by first taking the volume of the previous candle and dividing it by the difference of the open and close of that candle. This is then compared with how the current candle is forming. So, it would be the current volume, divided by the difference between the current price and the open price. It then compares with the results of the previous candle. The result will be a value such as 1.2, 3,4, 4.2, 5.1, etc.
So far, I have been able to produce a plot that shows the difference between the open and close prices. I can also produce a plot that shows the volume. I assigned a variable to each of them. When I try to divide the volume variable by the difference in price variable, nothing happens. This is the code:
double vol = Volume [0] ;
double current =(Open[0] > Close[0]) ? ((Open[0] - Close[0]) * 4) : ((Close[0] - Open[0]) * 4);
double efficiency = (vol / current) ;
Plot0.Set(efficiency);
This is just the start of my problems. If you can help me out with this issue, I might be able to figure out the next step. Thanks in advance.
Comment