30
EasyLanguage Development Specification
UpworkILNot specifiedintermediate
Software DevelopmentProject ManagementTradeStationTrainingObject-Oriented ProgrammingEasyLanguageAlgorithm DevelopmentStock Option AgreementForex TradingAutomationQuantitative AnalysisQuantitative Finance
# EasyLanguage Development Specification
## Manual Entry with Automated Exit Management
### Project Overview
I want to develop an algorithm in EasyLanguage that will not open positions automatically. The trader will enter positions manually, and the algorithm will be responsible only for managing exits based on predefined take‑profit and stop‑loss levels.
The strategy must support both long and short positions, detect the trader’s manual entry, and then automatically place and manage the relevant exit logic.
---
## Core Objective
The purpose of the algorithm is:
1. I enter a trade manually.
2. The algorithm detects whether my position is long or short.
3. The algorithm manages:
* Take‑profit exit
* Stop‑loss exit
4. The profit target and stop‑loss should be definable either by:
* Dollar amount
* Percentage
5. The algorithm must display the current profit target and stop‑loss levels directly on the chart as visible lines so I can manually drag them when needed.
---
## Functional Requirements
### 1. Manual Entry Detection
* The algorithm must not send any entry orders.
* It must detect when I manually open a position from the platform.
* It must identify:
* Position direction: Long or Short
* Position size: variable share quantity based on my manual order
* Average entry price
### 2. Exit Management Only
Once a manual position is detected, the algorithm should become active and manage exits only.
It should handle:
* Take‑profit
* Stop‑loss
When the position is closed manually or by one of the exit orders, the algorithm should reset and wait for the next manual entry.
---
## Profit Target and Stop Loss Logic
### 3. User Inputs
The developer should create inputs allowing me to choose:
#### Profit Target Mode
* Fixed dollar amount
* Percentage
#### Stop Loss Mode
* Fixed dollar amount
* Percentage
#### Additional Inputs
* Profit target value
* Stop loss value
The algorithm should calculate the exit levels based on:
* Entry price
* Position side (long/short)
* Position size if needed for dollar‑based logic
---
## Chart Visualization and Manual Adjustment
### 4. Display Exit Levels on Chart
This is a critical requirement.
The algorithm must draw clear horizontal lines on the chart representing:
* Take‑profit level
* Stop‑loss level
### 5. Draggable Levels
These lines must be adjustable visually on the chart so I can drag them manually if necessary.
Preferred behavior:
* Once I enter manually, the algorithm immediately plots both lines.
* If I drag either line, the algorithm updates the corresponding exit logic.
* The displayed lines must always reflect the currently active target and stop prices.
If native drag‑and‑drop interaction is limited in EasyLanguage/TradeStation, the developer should propose the closest possible implementation or workaround.
---
## Market Session Behavior
### 6. Pre‑Market Behavior
I plan to trade in pre‑market as well.
Because liquidity can be limited outside regular trading hours, the take‑profit and stop‑loss orders may need to be handled as limit orders rather than market orders.
However, the preferred behavior is:
* Trigger the exit immediately when price touches the level
* Send a market order on touch if technically possible
The developer should verify how EasyLanguage / TradeStation handles order routing during pre‑market and implement the safest practical solution.
### 7. Regular Market Hours Behavior
During regular stock market hours, when price reaches either the profit target or the stop‑loss level:
* The exit order must be sent as a market order
* This applies to both long and short positions
### 8. Important Execution Requirement
The purpose of using market orders only at the moment the level is reached is to avoid sending exit orders to the broker too early.
Meaning:
* I do not want resting market exit orders sitting with the broker ahead of time
* The algorithm should monitor price and send the market exit only when the target/stop condition is actually met
This requirement is especially important.
---
## Long / Short Logic
### 9. Long Position
If the manually entered position is long:
* Take‑profit must be above entry price
* Stop‑loss must be below entry price
### 10. Short Position
If the manually entered position is short:
* Take‑profit must be below entry price
* Stop‑loss must be above entry price
---
## Position Size Handling
### 11. Variable Share Size
The position size will not be fixed. I may enter different share quantities each time.
The algorithm must therefore:
* Detect actual filled quantity from the manual entry
* Apply exit logic to the full current position size
* Correctly handle both partial and full position changes if possible
If partial fills or manual scaling in/out create complexity, the developer should explicitly define how the system will behave in those cases.
---
## Edge Cases to Address
The developer should also consider:
* Manual long entry
* Manual short entry
* Manual exit before target/stop is hit
* Partial position reduction
* Position reversal
* Pre‑market execution
* Regular‑hours execution
* Gap through stop or target
* Chart line moved after entry
* Recalculation after platform restart or strategy reload
---
## Expected Deliverables
The developer should provide:
1. EasyLanguage strategy/study specification
2. Explanation of:
* How manual position detection works
* How exit orders are triggered
* How pre‑market vs regular hours behavior differs
* Whether draggable chart lines are fully supported or require a workaround
3. Final EasyLanguage code implementation
---
## Summary for Developer
The requested tool is an EasyLanguage trade management algorithm that:
* Allows manual trade entries
* Detects whether the position is long or short
* Automatically manages profit target and stop loss
* Supports exits based on dollars or percentage
* Displays target and stop levels as chart lines
* Allows visual adjustment of those levels
* Uses market exits when triggered during regular hours
* Handles pre‑market conditions appropriately
* Avoids sending exit orders to the broker before the trigger level is reached
Unlock AI intelligence, score breakdowns, and real-time alerts
Upgrade to Pro — $29.99/moClient
Spent: $75Rating: 0.0Verified