NexusFi: Find Your Edge


Home Menu

 





Store the price in a variable at which I entered the position


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one mattjack9708 with 2 posts (0 thanks)
    2. looks_two ABCTG with 1 posts (0 thanks)
    3. looks_3 andyprm70 with 1 posts (0 thanks)
    4. looks_4 numberjuani with 1 posts (0 thanks)
    1. trending_up 1,661 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Store the price in a variable at which I entered the position

  #1 (permalink)
 andyprm70 
Columbus, NJ
 
Posts: 4 since May 2019
Thanks Given: 0
Thanks Received: 1

I am super new to trading and easylanguage. About 3 months new. Into IT for 20+ years. understand programming.

I am trying to figure out the following:
1. If I am performing a "Buy next bar at Low+1Point + Higher;" how do I store this price at which I bought the contract? any sample code I can look for?

2. Is there any way I can Buy not at a "Next Bar" but lets say after 50 ticks? what will be the code or this cannot be done?

Currently I am trading on Canadian Futures.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
ZombieSqueeze
Platforms and Indicators
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

andyprm70,

you could for example use the reserved word EntryPrice to retrieve the fill price of an entry.

Depending on what you mean with "after 50 ticks" you could look into using a stop order for the entry at a specific price above the current market for a long.

Regards,

ABCTG



andyprm70 View Post
I am super new to trading and easylanguage. About 3 months new. Into IT for 20+ years. understand programming.

I am trying to figure out the following:
1. If I am performing a "Buy next bar at Low+1Point + Higher;" how do I store this price at which I bought the contract? any sample code I can look for?

2. Is there any way I can Buy not at a "Next Bar" but lets say after 50 ticks? what will be the code or this cannot be done?

Currently I am trading on Canadian Futures.


Follow me on Twitter Reply With Quote
  #3 (permalink)
 
numberjuani's Avatar
 numberjuani 
Agoura Hills, CA USA
 
Experience: Advanced
Platform: Tradestation&Multicharts
Broker: TradeStation
Trading: Futures & Equities
Posts: 128 since Apr 2019
Thanks Given: 9
Thanks Received: 102



andyprm70 View Post
I am super new to trading and easylanguage. About 3 months new. Into IT for 20+ years. understand programming.

I am trying to figure out the following:
1. If I am performing a "Buy next bar at Low+1Point + Higher;" how do I store this price at which I bought the contract? any sample code I can look for?

2. Is there any way I can Buy not at a "Next Bar" but lets say after 50 ticks? what will be the code or this cannot be done?

Currently I am trading on Canadian Futures.

HI Andy,

So theres the reserved word "EntryPrice", that you can refer later, like "Sell Next Bar at EntryPrice + 50", also, for your specific points:
#1: if you mean to buy one point above the Low, then that would be "Buy Next Bar at L+1 Limit". When youre buying below price you use Limit which means "this price or better" and when youre buying above price you use "stop" which means this price or worse. Also, "EntryPrice" will automatically know where you entered.
#2: 50 ticks after what? as soon as you make ticks part of your code the backtest will only be good for 6 months, because thats how much data TS stores for tick. Having said that the best way to do that would be to be in a tick chart, make your conditions a true false, and then check fifty bars ago. Example:
Variables:
Conditions(False);

Conditions = RSI > 30 and C < O

if Conditions[50] then buy next bar market;

Sound good?

Reply With Quote
  #4 (permalink)
mattjack9708
Wisconsin
 
Posts: 28 since Sep 2019
Thanks Given: 8
Thanks Received: 7


andyprm70 View Post
I am super new to trading and easylanguage. About 3 months new. Into IT for 20+ years. understand programming.

I am trying to figure out the following:
1. If I am performing a "Buy next bar at Low+1Point + Higher;" how do I store this price at which I bought the contract? any sample code I can look for?

2. Is there any way I can Buy not at a "Next Bar" but lets say after 50 ticks? what will be the code or this cannot be done?

Currently I am trading on Canadian Futures.

Are you working on algorithmic trading at the moment?

Reply With Quote
  #5 (permalink)
mattjack9708
Wisconsin
 
Posts: 28 since Sep 2019
Thanks Given: 8
Thanks Received: 7


mattjack9708 View Post
Are you working on algorithmic trading at the moment?

I am new trader here as well, but working on discretionary trading.

Reply With Quote




Last Updated on September 2, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts