Skip to main content Skip to footer
How to Submit a Stop Order Based on Calculated Price

 

Submitting a stop order based on a calculated price involves determining the entry price using specific criteria and then placing the order. Here’s how to achieve this:

 

Step 1: Calculate the Current Entry Price

Define the Calculation for the Entry Price: Determine the formula for calculating the stop order entry price. For example, a buy stop order could be set at the current bar's close price plus twice the Average True Range (ATR).

  • Example Calculation:

    • Indicator: Average True Range (ATR)

    • Multiplier: 2

    • Entry Price Formula: MyEntryPrice = Close + (ATR * 2)

 

Setup the Calculation in MSB:

  • Indicator: Define the ATR indicator.

  • Parameter: Define the multiplier as an input parameter value (e.g., Multiplier = 2).
  • Calculation: Create a local variable or directly compute the entry price using the defined formula.

 

Step 2: Submit an Order

Submit the Stop Order: Use the calculated entry price to submit a stop order. Ensure the order properties such as action type, order type, and time in force are properly configured.

  • Example Order Setup:

    • Action: Buy

    • Order Type: Stop

    • Entry Price: MyEntryPrice

    • Additional Properties:

      • Comment: Optionally add a comment for reference.

      • Time in Force: Set the duration for which the order remains active (e.g., Good Till Cancelled, DAY, Good Till Date).

      • Position Size Method: Define how the position size is determined (e.g., fixed contract, fixed fractional)

 

Example Implementation:

  1. Calculate Entry Price:

    • Indicator: ATR
    • Multiplier: 2
    • Formula: EntryPrice = Close + (ATR * 2)

  2. Submit Stop Order:

    • Action: Buy

    • Order Type: Stop

    • Entry Price: MyEntryPrice

    • Comment: "Entry based on Close + 2*ATR"

    • Time in Force: Good Till Cancelled

    • Position Size Method: Fixed Contract

 

Conclusion

By following these steps, traders can calculate an entry price using indicators and submit stop orders based on this calculated price. This approach allows for dynamic and precise order placement, improving the execution and effectiveness of trading strategies within FinStudio

Cookies Notice

We use cookies to improve your experience, personalize content, and analyze our traffic. By clicking "Accept All Cookies," you agree to the storing of cookies on your device. You can manage your cookie preferences at any time by visiting our Cookie Settings.