NexusFi: Find Your Edge


Home Menu

 





How to display entry price into AddOrder line


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,891 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?
$12M Ceasefire Contract Goes Disputed as Bandar Abbas St …
Prediction Markets & Event Contracts
Hormuz Surges From 14% to 26.5% Intraday as Irans Answer …
Prediction Markets & Event Contracts
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
April Jobs Beat Flips Fed Hike Odds Past 52% for First T …
Traders Hideout
Warsh Confirmed 54-45 on PPI Day -- 97% Say He Holds in …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
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