How to open mini lot of Bitcoin (0.01) using cBot

Created at 26 Apr 2021, 09:15
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
CT

ctid1373829

Joined 19.07.2019 Blocked

How to open mini lot of Bitcoin (0.01) using cBot
26 Apr 2021, 09:15


Help please!  this bot code cannot open mini-lot of bitcoin, i.e. 0.01 BTC.   Minimum it can open is 1 BTC.  How to change this code, or any other method to open mini-lot 0.01 lot of Bitcoin.  Many Thanks!

 

[Parameter(DefaultValue = 1000, MinValue = 0.01)]

public int Volume { get; set; }


Replies

PanagiotisCharalampous
26 Apr 2021, 09:22

Hi ctid1373829,

Can you please post the complete cBot code? Which broker do you use? Does the broker allow trading mini lots?

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

ctid1373829
26 Apr 2021, 10:54

RE:

Broker is FxPro and BTC mini lot is 0.01.  Link below contains the code.   Thanks

 

 


PanagiotisCharalampous
26 Apr 2021, 11:10

Hi ctid1373829,

The code you referenced does not seem to use Volume in the initializing orders, You need to modify the following lines to use Volume instead of a fixed value (10000)

            for (int i = 1; i < HowMuchPositions; i++)
            {
                Trade.CreateBuyStopOrder(Symbol, 10000, Symbol.Ask + Spacing * i * Symbol.PipSize);
            }
            for (int j = 1; j < HowMuchPositions; j++)
            {
                Trade.CreateSellStopOrder(Symbol, 10000, Symbol.Bid - Spacing * j * Symbol.PipSize);
            }

Also the code is very old (8 years :) ), it needs to be updated to the latest version. 

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

ctid1373829
26 Apr 2021, 11:45

RE:

Got it, Thanks a lot!