Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now, It is 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)
Need help with a stop loss based off a moving average value
Hey all. Brand new to Easy Language so don't be to harsh
What I'm trying to do:
I'm calculating Pivot Lows and a moving average on @ESH22 on a 5min chart. I would like to use the moving average value of the pivot low as a static stop loss.
This is what I'm using for Pivot calculation:
This part is fine. What I'm having trouble with is:
The entry executed as it should but the position was closed on the next candle at the same entry price. Another position was opened later in the day but then not closed at all like the previous position. So I'm kind of at a loss.
Any help or direction would be appreciated!
The following user says Thank You to xxjoocexx for this post:
welcome to futures.io. SetStopLoss is expecting a currency amount i.e. it places the stop Sellstop $ from the entry price in your case and does not seem to be the right choice for what you have in mind.
If you want to place orders at specific prices using actual stop orders is usually the better approach.
Regards,
ABCTG
The following 2 users say Thank You to ABCTG for this post:
Progress! Thanks for your replies! Still learning the details of this code (never tried coding before) so I was sure I missed something like that.
For my future knowledge, is it not possible to have the stop execute when that SlowAvg[3] price get's touched? Or will it always need to be the next bar. Going back through this forum, it seems most replies to similar questions was that it needed to be done at the next bar.
The following user says Thank You to xxjoocexx for this post:
Progress! Thanks for your replies! Still learning the details of this code (never tried coding before) so I was sure I missed something like that.
For my future knowledge, is it not possible to have the stop execute when that SlowAvg[3] price get's touched? Or will it always need to be the next bar. Going back through this forum, it seems most replies to similar questions was that it needed to be done at the next bar.
Hello fellow NorthEast Ohioan (I am in Cleveland, Bay Village actually).
If you are looking to have that stop on the entry bar, your choices are limited. SetStopLoss provides entry bar protection, but the "sell next bar at XXX stop;" does not.
If you need the entry bar protection, I would convert or try to estimate the dollar amount from your entry to the exit, and then use SetStopLoss.
I say estimate it because you may not know the exact entry price. It might be one of those things you play around with to see what works best for you.
The following user says Thank You to kevinkdog for this post:
Hello fellow NorthEast Ohioan (I am in Cleveland, Bay Village actually).
If you are looking to have that stop on the entry bar, your choices are limited. SetStopLoss provides entry bar protection, but the "sell next bar at XXX stop;" does not.
If you need the entry bar protection, I would convert or try to estimate the dollar amount from your entry to the exit, and then use SetStopLoss.
I say estimate it because you may not know the exact entry price. It might be one of those things you play around with to see what works best for you.
Hey neighbor! Small world!
Let me ask this, would it be possible to figure out how many points the moving average is below the pivot low calculation and then use SetStopLoss? Being able to figure out the points distance from pivot to moving average would actually be beneficial in another part of the code. Sorry for the lack of knowledge I'm still trying to grasp all that this language can do and get the syntax right.
Let me ask this, would it be possible to figure out how many points the moving average is below the pivot low calculation and then use SetStopLoss? Being able to figure out the points distance from pivot to moving average would actually be beneficial in another part of the code. Sorry for the lack of knowledge I'm still trying to grasp all that this language can do and get the syntax right.
Sure, you'd just have to subtract that pivot low from the moving average. You should have those values available in your code.
Let's say the difference is calculated to be X.
Then, you'd do
SetStopPosition;
SetStopLoss(X*BigPointvalue); //stop in dollars per total position
The following user says Thank You to kevinkdog for this post:
Sure, you'd just have to subtract that pivot low from the moving average. You should have those values available in your code.
Let's say the difference is calculated to be X.
Then, you'd do
SetStopPosition;
SetStopLoss(X*BigPointvalue); //stop in dollars per total position
I'll give this a go. I appreciate the help. I'm sure I'll be back for more. It'll be a good weekend to play around with it with that ice/snow coming our way. Take care!
The following user says Thank You to xxjoocexx for this post:
I'll give this a go. I appreciate the help. I'm sure I'll be back for more. It'll be a good weekend to play around with it with that ice/snow coming our way. Take care!
Gotta love Ohio in late Winter / early Spring!!!
Let me know if you need more help.
Also, I can't post it here since it links to my vendor website, but I do have a nice Tradestation resource list for lessons, tips etc.
If you are on Tradestation website forum, it it also posted there.
I'll give this a go. I appreciate the help. I'm sure I'll be back for more. It'll be a good weekend to play around with it with that ice/snow coming our way. Take care!
@kevinkdog and @ABCTG already answered, but I figured as an Akron native myself, I figured I would welcome you to the forum. Stay warm and dry this weekend!