Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Store the price in a variable at which I entered the position
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.
Can you help answer these questions from other members on NexusFi?
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.
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);