Confirmation Candles Indicator For ThinkorSwim

KLDXzTi.png
 
Hi @Christopher84
Thank you adding SL and TP levels to the strategy. I have a couple of questions:


IseYUW0.png


1. I am not getting the same P/L amount that you are getting for 15min 180days charts. I am not sure if any settings need to be changed. Could you please share your settings?
2. How do you calculate profit or loss of a trade? The highlighted short trade did not reach the TP1 and hit the SL. Would the P/L amount be calculated based on the SL only? or PL amount is considered until the next long trade is taken?

Thanks!
 
Hi @Christopher84
Thank you adding SL and TP levels to the strategy. I have a couple of questions:


IseYUW0.png


1. I am not getting the same P/L amount that you are getting for 15min 180days charts. I am not sure if any settings need to be changed. Could you please share your settings?
2. How do you calculate profit or loss of a trade? The highlighted short trade did not reach the TP1 and hit the SL. Would the P/L amount be calculated based on the SL only? or PL amount is considered until the next long trade is taken?

Thanks!
Hi @Ghs,
Please reload the code from pg.1. I noted a small issue with the atr factor (now corrected).
1. Make sure your after market hours are turned off. For the 15 min /es chart, I use an atr period of 5 (default) and atr period of 3.0.
2. The floating p/l is calculated based on the entire strategy not the targets or stoploss. The profits shown on the targets are calculated from the order entry (green line for long trades, red line for short trades). Hope this helps!
 
  • Like
Reactions: Ghs
Hi @Ghs,
Please reload the code from pg.1. I noted a small issue with the atr factor (now corrected).
1. Make sure your after market hours are turned off. For the 15 min /es chart, I use an atr period of 5 (default) and atr period of 3.0.
2. The floating p/l is calculated based on the entire strategy not the targets or stoploss. The profits shown on the targets are calculated from the order entry (green line for long trades, red line for short trades). Hope this helps!
Thank you @Christopher84! P/L is showing same as your for 15min tf. What is your atr period and factor for 3mins tf?
 
Hi @Christopher84 not to muddle your thread, just quick questions related.
1. Thanks for all your knowledge and hard work and contributions!!
2. What does TS stand for in your script name?
3. Have you ever done any work with the AXD or Vortex indicator data? I like the granularity of the indicator charts it produces for divergents and such.
 
Hi @Madhu,
My notes above the code on pg.1 of the thread were to address this. It can be used on stocks and other futures, but the "mult" will need to be changed to 1 for stocks and for other futures mult will need to be changed to the appropriate multiplier.
1IrrTkx.png

My questions are trivial, hope they don't waste your much time:
1. Where to change the default setting mult from 50 to 1? I searched code, but did not find
2. Could you give an example of condition 0>0 I need to set?

Code:
######################################################
##  Create Signals -
##  FILL IN THIS SECTION
##      replace 0>0 with your conditions for signals
######################################################

def PLBuySignal = if  MarketOpen AND (upsignal) then 1 else 0 ; # insert condition to create long position in place of the 0>0
def PLSellSignal =  if MarketOpen AND (downsignal) then 1 else 0; # insert condition to create short position in place of the 0>0

def PLBuyStop  = if !useStops then 0 else if  (0>0) then 1 else 0  ; # insert condition to stop in place of the 0<0
def PLSellStop = if !useStops then 0 else if (0>0) then 1 else 0  ; # insert condition to stop in place of the 0>0

Appreciate it.
 
My questions are trivial, hope they don't waste your much time:
1. Where to change the default setting mult from 50 to 1? I searched code, but did not find
2. Could you give an example of condition 0>0 I need to set?

Code:
######################################################
##  Create Signals -
##  FILL IN THIS SECTION
##      replace 0>0 with your conditions for signals
######################################################

def PLBuySignal = if  MarketOpen AND (upsignal) then 1 else 0 ; # insert condition to create long position in place of the 0>0
def PLSellSignal =  if MarketOpen AND (downsignal) then 1 else 0; # insert condition to create short position in place of the 0>0

def PLBuyStop  = if !useStops then 0 else if  (0>0) then 1 else 0  ; # insert condition to stop in place of the 0<0
def PLSellStop = if !useStops then 0 else if (0>0) then 1 else 0  ; # insert condition to stop in place of the 0>0

Appreciate it.
click edit studies, last line in the setting below timeframe. Multi change to 1.
 
click edit studies, last line in the setting below timeframe. Multi change to 1.
Sorry, I still did not get it. You mean click edit studies on the UI? I only got the list of studies. I tried other gear, but still did not find it. I looked at the code again, not find it either. Is it possible to have a screenshot? Thank you.
 
Sorry, I still did not get it. You mean click edit studies on the UI? I only got the list of studies. I tried other gear, but still did not find it. I looked at the code again, not find it either. Is it possible to have a screenshot? Thank you.
Click on the flask icon, this brings up your "Added studies and strategies" pane, then click the gear icon next to your saved named study for all the adjustable inputs and options.
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
422 Online
Create Post

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top