NexusFi: Find Your Edge


Home Menu

 





How to display entry price into AddOrder line


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,998 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 bobbydigital83 
San Francisco Ca/USA
 
Experience: Advanced
Platform: tos
Trading: es
Posts: 29 since Jan 2019
Thanks Given: 12
Thanks Received: 7

AddOrder(OrderType.BUY_AUTO, sma crosses over ema, entry, name = "LONG");

I am trying to find a way to essentially display the entry or trigger price when the strategy gives a signal. I was thinking "entryprice" which I tried but it was not working. I tried putting typing "name = entryprice ()" but it was errors.

Hoping someone in here can assist. Thanks!


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My Rant with AMP Futures
Trading Reviews and Vendors
EA
Platforms and Indicators
RTH vs ETH: when your chart and Volume Profile trading h …
NinjaTrader
No book, only a stair: journaling fills where price move …
Cryptocurrency
Trump Media to sell instant access to market-moving soci …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
TopStep Trader disappointment
2 thanks
Running trading strategies on a VPS
1 thanks
  #2 (permalink)
 ocpb 
Hartford CT, USA
 
Experience: Beginner
Platform: None
Trading: ES
Posts: 126 since Jan 2015
Thanks Given: 152
Thanks Received: 126


bobbydigital83 View Post
AddOrder(OrderType.BUY_AUTO, sma over ema, entry, name = "LONG");

I am trying to find a way to essentially display the entry or trigger price when the strategy gives a signal. I was thinking "entryprice" which I tried but it was not working. I tried putting typing "name = entryprice ()" but it was errors.

Hoping someone in here can assist. Thanks!

In thinkscript, (as in any programming), the error you get is the most important clue to what is wrong.
EntryPrice() is a numerical value. Name must be a string.

See the thinkscript function AsText(), might be useful here:

https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Others/AsText.html


Reply With Quote
  #3 (permalink)
 bobbydigital83 
San Francisco Ca/USA
 
Experience: Advanced
Platform: tos
Trading: es
Posts: 29 since Jan 2019
Thanks Given: 12
Thanks Received: 7


AddOrder(OrderType.BUY_AUTO, sma crosses over ema, entry, name = "LONG"), AddLabel(yes, NumberFormat.TWO_DECIMAL_PLACES));

My apologies for my errors. I am new to coding in general.

This did not work as well.

I was thinking, I did not need " (close - close[length]) / close[length]" because the AddOrder would trigger the price? I tried with it as well as without... did not work.


Started this thread Reply With Quote




Last Updated on March 29, 2019


© 2026 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 - Downloads - Top
no new posts