NexusFi: Find Your Edge


Home Menu

 





How to display entry price into AddOrder line


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,834 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?
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
Friday Update: Markets Now Pricing Fed Rate HIKES as Sta …
Traders Hideout
Thanks Mike. Godspeed.
The Elite Circle
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 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