NeedForTrade Documentation

Buy Methods

Buy method names are constructed as follows:

Buy<When><Price>([<Parameters>])

 

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

 

For example:

BuyNextBarAtMarket();

 

Available When variants:

 

Available Price variants:

 

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

 

List of available Buy methods with possible parameters:

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

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

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

 // BuyNextBarAtOpenOfNextBarLimit
    void BuyNextBarAtOpenOfNextBarLimit(double relativePrice);
    void BuyNextBarAtOpenOfNextBarLimit(double relativePrice, int tradeSize);
    void BuyNextBarAtOpenOfNextBarLimit(string tradeName, double relativePrice);
    void BuyNextBarAtOpenOfNextBarLimit(string tradeName, double relativePrice, int tradeSize);

 // BuyNextBarAtOpenOfNextBarStop
    void BuyNextBarAtOpenOfNextBarStop(double relativePrice);
    void BuyNextBarAtOpenOfNextBarStop(double relativePrice, int tradeSize);
    void BuyNextBarAtOpenOfNextBarStop(string tradeName, double relativePrice);
    void BuyNextBarAtOpenOfNextBarStop(string tradeName, double relativePrice, int tradeSize);

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

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