NeedForTrade Documentation

Buy Methods

Buy method names are constructed as follows:

Buy<Price>([<Parameters>])

 

<Parameters> are optional and may vary depending on your needs.

 

For example:

BuyAtMarket();

 

Available Price variants:

 

Tip: relativePrice can be negative to specify price less then Open price of the next bar.

 

Backtesting Real Time Strategies on historical data:

 

List of available Buy methods with possible parameters:

// BackTestBuy
    void BackTestBuy(double price);
    void BackTestBuy(double price, int tradeSize);
    void BackTestBuy(string tradeName, double price);
    void BackTestBuy(string tradeName, double price, int tradeSize);

// BuyAtLimit
    void BuyAtLimit(double limitPrice);
    void BuyAtLimit(double limitPrice, int tradeSize);
    void BuyAtLimit(string tradeName, double limitPrice);
    void BuyAtLimit(string tradeName, double limitPrice, int tradeSize);

// BuyAtMarket
    void BuyAtMarket();
    void BuyAtMarket(int tradeSize);
    void BuyAtMarket(string tradeName);
    void BuyAtMarket(string tradeName, int tradeSize);

// BuyAtStop
    void BuyAtStop(double stopPrice);
    void BuyAtStop(double stopPrice, int tradeSize);
    void BuyAtStop(string tradeName, double stopPrice);
    void BuyAtStop(string tradeName, double stopPrice, int tradeSize);