Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Unable to change script to represent "ticks"
Updated April 1, 2019
trending_up
1,124 views
thumb_up
1 thanks given
group
2 followers
forum
7 posts
attach_file
0 attachments
Unable to change script to represent "ticks"
March 29th, 2019, 07:39 PM
San Francisco Ca/USA
Experience: Advanced
Platform: tos
Trading: es
Posts: 29 since Jan 2019
Thanks Given: 12
Thanks Received: 7
I am having problems how to get this to be defined by ticks instead of points .
AddOrder(OrderType.SELL_TO_CLOSE, close > EntryPrice() + 10 or close < EntryPrice() - 8);
I am trying to say close long order when "+10 ticks" in profit or "-8 ticks" in loss
I also tried to think these up but its doesn't seem to be working :
AddOrder(OrderType.buy_TO_CLOSE, close > EntryPrice() + tickvalue () + 10 or close < EntryPrice(), tickvalue () - 8);
and
AddOrder(OrderType.buy_TO_CLOSE, close > EntryPrice() and tickvalue () + 10 or close < EntryPrice(), tickvalue () - 8);
Hopefully someone here can help me out! Thanks in advance!!!
UPDATE:
AddOrder(OrderType.buy_TO_CLOSE, close < EntryPrice() and tickvalue () + 10 or close > EntryPrice() and tickvalue () - 8);
That is producing results. Did I figure it out correctly?
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
March 29th, 2019, 07:51 PM
San Francisco Ca/USA
Experience: Advanced
Platform: tos
Trading: es
Posts: 29 since Jan 2019
Thanks Given: 12
Thanks Received: 7
AddOrder(OrderType.SELL_TO_CLOSE, close > EntryPrice() and tickvalue () + 10 or close < EntryPrice() and tickvalue () - 3);
AddOrder(OrderType.buy_TO_CLOSE, close < EntryPrice() and tickvalue () - 10 or close > EntryPrice() and tickvalue () + 3);
This is the closet I can think of and even though it producing results... its seems skewed. Hopefully someone is able to help me figure this out.
March 29th, 2019, 07:57 PM
San Francisco Ca/USA
Experience: Advanced
Platform: tos
Trading: es
Posts: 29 since Jan 2019
Thanks Given: 12
Thanks Received: 7
AddOrder(OrderType.SELL_TO_CLOSE, tickvalue () + 10 or tickvalue () - 8);
AddOrder(OrderType.buy_TO_CLOSE, tickvalue () - 10 or tickvalue () + 8);
No luck with these either.
March 29th, 2019, 09:00 PM
OR/USA
Legendary /NQ Trader
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,106
10 ticks = 2.5 points . Have you tried 2.5 points?
March 29th, 2019, 09:07 PM
San Francisco Ca/USA
Experience: Advanced
Platform: tos
Trading: es
Posts: 29 since Jan 2019
Thanks Given: 12
Thanks Received: 7
AddOrder(OrderType.SELL_TO_CLOSE, EntryPrice() + 2.5 or EntryPrice() - 1); #TP at +2.5 points or SL at -1 points
AddOrder(OrderType.buy_TO_CLOSE, EntryPrice() - 2.5 or EntryPrice() + 1); #TP at -2.5 points or SL at +1 points
Would this be correct? Results still look skewed.
March 29th, 2019, 10:12 PM
Hartford CT, USA
Experience: Beginner
Platform: None
Trading: ES
Posts: 126 since Jan 2015
Thanks Given: 152
Thanks Received: 125
bobbydigital83
AddOrder(OrderType.SELL_TO_CLOSE, EntryPrice() + 2.5 or EntryPrice() - 1); #TP at +2.5
points or SL at -1 points
AddOrder(OrderType.buy_TO_CLOSE, EntryPrice() - 2.5 or EntryPrice() + 1); #TP at -2.5 points or SL at +1 points
Would this be correct? Results still look skewed.
I notice this is missing comparison operators, like you'd included in a few prior posts. i.e. "close > X or close < Y"
March 29th, 2019, 11:21 PM
San Francisco Ca/USA
Experience: Advanced
Platform: tos
Trading: es
Posts: 29 since Jan 2019
Thanks Given: 12
Thanks Received: 7
It seems its going in the right direction but doesn't seem to behave properly...
AddOrder(OrderType.SELL_TO_CLOSE, close > EntryPrice() + 2 or close < EntryPrice() - 1);
AddOrder(OrderType.buy_TO_CLOSE, close < EntryPrice() - 2 or close > EntryPrice() + 1);
any pointers?
March 31st, 2019, 08:53 PM
OR/USA
Legendary /NQ Trader
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,106
What's happening when you say it's not behaving properly? screenshots of the strat on a chart would be helpful
Last Updated on March 31, 2019