NexusFi: Find Your Edge


Home Menu

 





How to code this set up ?


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one Ty199 with 11 posts (5 thanks)
    2. looks_two mtzimmer1 with 5 posts (8 thanks)
    3. looks_3 CodingDummy with 3 posts (1 thanks)
    4. looks_4 wldman with 1 posts (0 thanks)
    1. trending_up 3,960 views
    2. thumb_up 14 thanks given
    3. group 6 followers
    1. forum 20 posts
    2. attach_file 2 attachments




 
Search this Thread

How to code this set up ?

  #11 (permalink)
 
mtzimmer1's Avatar
 mtzimmer1 
Upstate NY
Recovering Method Hopper
 
Experience: Intermediate
Platform: TOS
Broker: TD Ameritrade
Trading: Equities, Treasuries, Gold
Posts: 840 since Dec 2018
Thanks Given: 2,201
Thanks Received: 1,918


JonnyBoy View Post
I don't use T.O.S but when guys have completed development of this, consider uploading to the download section. I like what you doing here, and it could help out others.



I don’t even know how to do that but would be happy to upload the script if anyone else would get use from it!

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #12 (permalink)
Ty199
Joplin, Mo. Jasper
 
Posts: 47 since Sep 2019
Thanks Given: 16
Thanks Received: 47

Okay the results for today.
These are the settings I had put them on to trade. ( this was all done on paper simulator TOS with 1 contract)
All was set on a 5 min time frame. All buy orders was placed at 4 ticks above the charting lines price. SL was placed at the charting line prices. TP was placed at 8 ticks above the buy order price. These was also placed on the sell side if it was to have went to the down side.

/QM 1 trade, SL was hit for a loss of $50, but the break out still occurred on the same or the next 5 min candle and would have hit the TP. ( SL was hit by 3 ticks under SL price )

/CL 2 trades total, Trade 1 TP was hit for a Gain of $80
Trade 2, SL was hit for a loss of $40, but break out did occur on the same or next 5 min candle and TP would have been reached. (SL was hit by 4 ticks under SL price.)

/CL had 2 trades due to having a closing candle below the charting price which reset the trade.
Over all was a -$10 loss. With fees it would have came to a near total of -$25 loss on the day.

I dont think it is bad at all, all trades did break out and would have hit the TP. All woud have been a min. of 2 to 1 profit. Think the change will be to move the buy order price 8 ticks above charting price and have the SL 3 ticks above charting price. All break out was easy a 2 to 1 win, by moving the buy order higher this could change the buy price to be in the break out area more, which would lead to not hitting the SL so easy. Plus add 1 extra tick to the SL price instead of 4 it would be 5. Little more risk but the reward would still be set at 2 to 1. What does anyone else recommend ? Thanks

Reply With Quote
  #13 (permalink)
Ty199
Joplin, Mo. Jasper
 
Posts: 47 since Sep 2019
Thanks Given: 16
Thanks Received: 47



mtzimmer1 View Post
I don’t even know how to do that but would be happy to upload the script if anyone else would get use from it!

A little change in some buy and sell areas will make this a good plan for a select few contracts. Just from quick look it seems the energy sector does well with this kind of set up. (oil, natural gas, ect.) just have to get it to a good setting where the win loss is above 70% I would think.. But this is awesome so glad you made in to a code !

Reply With Quote
  #14 (permalink)
 
mtzimmer1's Avatar
 mtzimmer1 
Upstate NY
Recovering Method Hopper
 
Experience: Intermediate
Platform: TOS
Broker: TD Ameritrade
Trading: Equities, Treasuries, Gold
Posts: 840 since Dec 2018
Thanks Given: 2,201
Thanks Received: 1,918


Ty199 View Post
A little change in some buy and sell areas will make this a good plan for a select few contracts. Just from quick look it seems the energy sector does well with this kind of set up. (oil, natural gas, ect.) just have to get it to a good setting where the win loss is above 70% I would think.. But this is awesome so glad you made in to a code !



Awesome! Instead of using an arbitrary number of ticks I would recommend using a threshold based on the size of the range. By doing this, the strategy will adjust itself to current volatility conditions.





Post some charts of the strategy in action!

If you can get this to a 70% win rate and 2:1 reward:risk I will stop looking for the holy grail because we will have found it. Even a 70% win rate and 1:1 risk:reward would be fantastic!

I don’t mean to be pessimistic but I think setting realistic expectations is very important.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #15 (permalink)
CodingDummy
Sacramento, California
 
Posts: 10 since Sep 2019
Thanks Given: 6
Thanks Received: 1

I love this. I have a similar idea in mind and will try to use this as a starting point

Reply With Quote
  #16 (permalink)
CodingDummy
Sacramento, California
 
Posts: 10 since Sep 2019
Thanks Given: 6
Thanks Received: 1

Matter of fact, it revolves around the prior weeks range and a very similar calculation. What would need to be changed for using Week instead of Day?

For the formula I’m looking to take the prior weekly range x 0.75 then subtract that number from the prior weekly range again and divide it by 2. Something like this...

(Prior weekly Range x 0.75) - Prior Range = X

X / 2 = Y

Prior Weekly High - Y = New upper weekly horizontal line
Prior weekly Low + Y = New lower Weekly horizontal line

Reply With Quote
  #17 (permalink)
CodingDummy
Sacramento, California
 
Posts: 10 since Sep 2019
Thanks Given: 6
Thanks Received: 1

These act as support and resistance until they break and then lead to price acceleration or deceleration based on the reaction to the range line

Reply With Quote
Thanked by:
  #18 (permalink)
Ty199
Joplin, Mo. Jasper
 
Posts: 47 since Sep 2019
Thanks Given: 16
Thanks Received: 47


mtzimmer1 View Post
Awesome! Instead of using an arbitrary number of ticks I would recommend using a threshold based on the size of the range. By doing this, the strategy will adjust itself to current volatility conditions.





Post some charts of the strategy in action!

If you can get this to a 70% win rate and 2:1 reward:risk I will stop looking for the holy grail because we will have found it. Even a 70% win rate and 1:1 risk:reward would be fantastic!

I don’t mean to be pessimistic but I think setting realistic expectations is very important.


Is it possible to code it where it would be able to calculate the buy price, stop lose and target price all in one ?
I think with some messing with it it should be able to achieve atleast a 60% win to loss ratio. I only do day trading, I dont hold anything overnight, so this could be calculated to be a swing trade I would think. But yea I will post some pictures of it set up on a chart. I will also try and do a video of it hitting a break out and watching it work. I could post that to You Tube. It might take a couple days to do that. I am busy for the next couple days during the main trading times in the mornings. Thanks for all the help on this ! I will post everything so we can see how to tune it as good as possible. I have this set up on bracket orders on /QM, /CL and /NG. It seems to work with them best just from looking at it on charts it could possibly work with ETF's of these such as UGAZ, DGAZ, but that would have to be researched at another time. To be honest, I really enjoy trying to find good set ups that have a good probability to be profitable. I still have a good one on Bonds, but those things move so slow and dont get many ticks on them at one time. But I will try and get this close to being as good as it can. Always will be interested in any advice on what should be used to try and make it better.

Reply With Quote
Thanked by:
  #19 (permalink)
Ty199
Joplin, Mo. Jasper
 
Posts: 47 since Sep 2019
Thanks Given: 16
Thanks Received: 47

Well I was not able to get all the details of the trades before it started a new session for the day. But I was able to take just a quick look at it during the day and seen that it got slammed to the dirt. There was many losers with that much of a spread on the SL. Buy Order and TP.
What I will try to do now is focus just on the /QM. I have it set now at 1.25 to 1 profit ratio.
on /QM the chart price is rounded to the nearest tick. Chart price is the SL. I added 4 ticks to the Buy Order from the chart price. Then it is 5 ticks to the TP from the buy order for the 1.25 to 1 ratio. This done on the 5 min chart. Here is a picture of the 2 Bracket Orders I have set up. Hope this gets us close to the 60% plus win/ loss.

Attached Thumbnails
Click image for larger version

Name:	Paper@thinkorswim [build 1958] 9_10_2019 9_05_46 PM.png
Views:	257
Size:	206.3 KB
ID:	274830  
Reply With Quote
  #20 (permalink)
Ty199
Joplin, Mo. Jasper
 
Posts: 47 since Sep 2019
Thanks Given: 16
Thanks Received: 47



Ty199 View Post
Well I was not able to get all the details of the trades before it started a new session for the day. But I was able to take just a quick look at it during the day and seen that it got slammed to the dirt. There was many losers with that much of a spread on the SL. Buy Order and TP.
What I will try to do now is focus just on the /QM. I have it set now at 1.25 to 1 profit ratio.
on /QM the chart price is rounded to the nearest tick. Chart price is the SL. I added 4 ticks to the Buy Order from the chart price. Then it is 5 ticks to the TP from the buy order for the 1.25 to 1 ratio. This done on the 5 min chart. Here is a picture of the 2 Bracket Orders I have set up. Hope this gets us close to the 60% plus win/ loss.

Also added the /CL chart

Attached Thumbnails
Click image for larger version

Name:	Paper@thinkorswim [build 1958] 9_10_2019 9_37_10 PM.png
Views:	220
Size:	221.5 KB
ID:	274831  
Reply With Quote




Last Updated on September 18, 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