NeedForTrade Documentation

Buy To Cover Methods

Buy To Cover method names are constructed as follows:

BuyToCover<When><Price>[<ExitOptions>]([<Parameters>])

 

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

 

For example:

BuyToCoverNextBarAtMarket();

 

Available When variants:

 

Available Price variants:

 

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

 

Available ExitOptions variants:

 

Tip: use FromEntry exit option to to close specific entries named with tradeName parameter.

 

List of available BuyToCover methods with possible parameters:

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

    void BuyToCoverNextBarAtLimitFromEntry(string tradeName, double limitPrice, int tradeSize);

    void BuyToCoverNextBarAtLimitFromEntryTotal(string tradeName, double limitPrice, int tradeSize);

    void BuyToCoverNextBarAtLimitTotal(double limitPrice, int tradeSize);
    void BuyToCoverNextBarAtLimitTotal(string tradeName, double limitPrice, int tradeSize);

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

    void BuyToCoverNextBarAtMarketFromEntry(string tradeName, int tradeSize);

    void BuyToCoverNextBarAtMarketFromEntryTotal(string tradeName, int tradeSize);

    void BuyToCoverNextBarAtMarketTotal(int tradeSize);
    void BuyToCoverNextBarAtMarketTotal(string tradeName, int tradeSize);

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

    void BuyToCoverNextBarAtOpenFromEntry(string tradeName, int tradeSize);

    void BuyToCoverNextBarAtOpenFromEntryTotal(string tradeName, int tradeSize);

    void BuyToCoverNextBarAtOpenOfNextBarLimit(double relativePrice);
    void BuyToCoverNextBarAtOpenOfNextBarLimit(double relativePrice, int tradeSize);
    void BuyToCoverNextBarAtOpenOfNextBarLimit(string tradeName, double relativePrice);
    void BuyToCoverNextBarAtOpenOfNextBarLimit(string tradeName, double relativePrice, int tradeSize);

    void BuyToCoverNextBarAtOpenOfNextBarLimitFromEntry(string tradeName, double relativePrice, int tradeSize);

    void BuyToCoverNextBarAtOpenOfNextBarLimitFromEntryTotal(string tradeName, double relativePrice, int tradeSize);

    void BuyToCoverNextBarAtOpenOfNextBarLimitTotal(double relativePrice, int tradeSize);
    void BuyToCoverNextBarAtOpenOfNextBarLimitTotal(string tradeName, double relativePrice, int tradeSize);

    void BuyToCoverNextBarAtOpenOfNextBarStop(double relativePrice);
    void BuyToCoverNextBarAtOpenOfNextBarStop(double relativePrice, int tradeSize);
    void BuyToCoverNextBarAtOpenOfNextBarStop(string tradeName, double relativePrice);
    void BuyToCoverNextBarAtOpenOfNextBarStop(string tradeName, double relativePrice, int tradeSize);

    void BuyToCoverNextBarAtOpenOfNextBarStopFromEntry(string tradeName, double relativePrice, int tradeSize);

    void BuyToCoverNextBarAtOpenOfNextBarStopFromEntryTotal(string tradeName, double relativePrice, int tradeSize);

    void BuyToCoverNextBarAtOpenOfNextBarStopTotal(double relativePrice, int tradeSize);
    void BuyToCoverNextBarAtOpenOfNextBarStopTotal(string tradeName, double relativePrice, int tradeSize);

    void BuyToCoverNextBarAtOpenTotal(int tradeSize);
    void BuyToCoverNextBarAtOpenTotal(string tradeName, int tradeSize);

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

    void BuyToCoverNextBarAtStopFromEntry(string tradeName, double stopPrice, int tradeSize);

    void BuyToCoverNextBarAtStopFromEntryTotal(string tradeName, double stopPrice, int tradeSize);

    void BuyToCoverNextBarAtStopTotal(double stopPrice, int tradeSize);
    void BuyToCoverNextBarAtStopTotal(string tradeName, double stopPrice, int tradeSize);

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

    void BuyToCoverThisBarOnCloseFromEntry(string tradeName, int tradeSize);

    void BuyToCoverThisBarOnCloseFromEntryTotal(string tradeName, int tradeSize);

    void BuyToCoverThisBarOnCloseTotal(int tradeSize);
    void BuyToCoverThisBarOnCloseTotal(string tradeName, int tradeSize);