Replies

pipsniper123
10 Oct 2017, 15:34

RE:

Panagiotis Charalampous said:

Hi pipsiper123,

The following code should do the work for you

var volume = Math.Ceiling((Symbol.QuantityToVolume(130.64) / (double)Symbol.VolumeStep)) * Symbol.VolumeStep;

Use Math.Ceiling or Math.Floor based on how you would like to round your volume.

Best Regards,

Panagiotis

 

Works perfectly, thanks!


@pipsniper123

pipsniper123
21 Dec 2016, 22:05

RE:

andi21 said:

Hello pipsniper123, the solution is the correct method defintion: public override void OnBar() { } // notice the override keyword Best Regards, Andi21

Hi Andi, thanks for your response.

But when I try this, I get the error: Error CS0115: 'cAlgo.NewIndicator.OnBar()': no suitable method found to override.

When exactly are you allowed to use override? I got this message a lot of times before when I tried implementing override somewhere. 

 

Kind regards

 


@pipsniper123