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 -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Sorry to bug you again but I have a glitch in my TradeStation ‘Naked Bottom” system which didn’t show-up right away. I have been working on a solution for over a week, and I finally run-out of ideas.
As discussed in our earlier correspondence; my ‘Naked Bottom” exit strategy (for a Long trade) is intended to trigger a Sell when price is < Entry Low [1]. In other words: Sell on a break of the low of the ‘Bar-Before-Entry’.
The code you helped me develop performs as intended except for one flaw.
As indicated on attached Barchart of my ‘Naked Bottom” system, the intended system sequence is as follows:
1. Market Position is MP=0 (Blue Dots on chart) until Entry Signal #1 is received.
2. Entry Signal #1 is received (Red Dot on chart) which initiates MP = 1 (Yellow Dots on chart) and signals a Long Trade.
3. Entry Signal #2 (Red Dot) is received and will continue with the original trade (Still MP = 1), but is expected to re-set the ‘Exit Trigger’ to < Entry Low [1] of Entry #2.
Note: In the case of Entry #2, the < Entry Low [1] of Entry #2 was not breached, and no exit was made (as was expected).
4. Entry Signal #3 (Red Dot) is received and continues the original trade (Still MP = 1), and (as discussed in Item 3 above) the ‘Exit Trigger’ is expected to be re-set to < Entry Low [1] of Entry #3.
Note: In the case of Entry #3, the < Entry Low [1] was breached, but no exit was made. Instead; many bars later, the actual exit (Green Dot) was made on the basis of < Entry Low [1] ofEntry #1 (not Entry #3), whereupon Market Position was returned to MP=0 (Blue Dots on chart)
Question / Comment:
• How may I code my ‘Exit Trigger’ to re-calculate to the < Entry Low [1] for each succeeding Entry Signal, rather than the < Entry Low [1] of my initial entry?
Note: I do understand that a re-set depends on the Market Position reverting back to MP=0, when each new Entry Signal populates, but I cannot figure out how to make that happen.
My Indicator Code for attached BarChart is as follows:
Sorry to bug you again but I have a glitch in my TradeStation ‘Naked Bottom” system which didn’t show-up right away. I have been working on a solution for over a week, and I finally run-out of ideas.
As discussed in our earlier correspondence; my ‘Naked Bottom” exit strategy (for a Long trade) is intended to trigger a Sell when price is < Entry Low [1]. In other words: Sell on a break of the low of the ‘Bar-Before-Entry’.
The code you helped me develop performs as intended except for one flaw.
As indicated on attached Barchart of my ‘Naked Bottom” system, the intended system sequence is as follows:
1. Market Position is MP=0 (Blue Dots on chart) until Entry Signal #1 is received.
2. Entry Signal #1 is received (Red Dot on chart) which initiates MP = 1 (Yellow Dots on chart) and signals a Long Trade.
3. Entry Signal #2 (Red Dot) is received and will continue with the original trade (Still MP = 1), but is expected to re-set the ‘Exit Trigger’ to < Entry Low [1] of Entry #2.
Note: In the case of Entry #2, the < Entry Low [1] of Entry #2 was not breached, and no exit was made (as was expected).
4. Entry Signal #3 (Red Dot) is received and continues the original trade (Still MP = 1), and (as discussed in Item 3 above) the ‘Exit Trigger’ is expected to be re-set to < Entry Low [1] of Entry #3.
Note: In the case of Entry #3, the < Entry Low [1] was breached, but no exit was made. Instead; many bars later, the actual exit (Green Dot) was made on the basis of < Entry Low [1] ofEntry #1 (not Entry #3), whereupon Market Position was returned to MP=0 (Blue Dots on chart)
Question / Comment:
• How may I code my ‘Exit Trigger’ to re-calculate to the < Entry Low [1] for each succeeding Entry Signal, rather than the < Entry Low [1] of my initial entry?
Note: I do understand that a re-set depends on the Market Position reverting back to MP=0, when each new Entry Signal populates, but I cannot figure out how to make that happen.
My Indicator Code for attached BarChart is as follows:
if I understand you correctly the problem you are facing spans from two things:
1. You need multiple different entries with each using its own stop value.
2. You only allow the stop value to be updated when you are flat.
You will most likely have to look into loops and arrays or use a list to accomplish what you want, be more convenient (although this would be a lot more complex due to the OOEL nature, though).
You basically need to update the NakedBtmLow every time the condition is met, but regardless of the market position. Then upon an entry signal store the current NakedBtmLow value in the list or array.
When you are currently in a position you have to loop through your list or array to check if the current price stopped any of your entries out, then you can remove this particular NakedBtmLow value from the list or array. This last part is where a list is more handy than the array for your problem, as removing entries is slightly simpler with lists (as you can simply shrink the list with removing entries, where the array would keep it's size and you'd manage the indices that have values within the array yourself).
This is definitely doable, but a bit more complex.
I knew there must be a tool I was missing, and OOEL is apparently it.
Looks like I’ve got my work cut-out for me, but I can imagine that OOEL will be a useful tool for future projects.