NexusFi: Find Your Edge


Home Menu

 





Tradestation: entry condition


Discussion in TradeStation

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




 
Search this Thread
  #1 (permalink)
 miklburns 
Phoenix AZ
 
Experience: Beginner
Platform: Tradestation
Broker: Tradestation
Trading: Any
Posts: 5 since May 2017
Thanks Given: 1
Thanks Received: 1

Please see attached jpeg. I set up a condition which would trigger an entry if both statements are TRUE, but it triggered with a TRUE and FALSE.

Am I missing something in the Development Environment?

Thank you for your time.

Mike


Attached Thumbnails
Click image for larger version

Name:	Please Help.jpg
Views:	255
Size:	164.2 KB
ID:	246920  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
Four New E-mini Futures Launch June 29 -- Russell 3000, …
Emini and Emicro Index
Would a node-based workflow for automated trading be useful?
Traders Hideout
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
 
  #2 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,738 since Jul 2012
Thanks Given: 1,918
Thanks Received: 7,487


miklburns View Post
Please see attached jpeg. I set up a condition which would trigger an entry if both statements are TRUE, but it triggered with a TRUE and FALSE.

Am I missing something in the Development Environment?

Thank you for your time.

Mike

I would say you should use print statements to see the actual values. My guess is what you are plotting on the chart (from an indicator) is not the same as what is in the strategy.

print(date",",",time,",",asxAvg2,",",asxAvg2[1]); //code not checked


Follow me on X Reply With Quote
  #3 (permalink)
 miklburns 
Phoenix AZ
 
Experience: Beginner
Platform: Tradestation
Broker: Tradestation
Trading: Any
Posts: 5 since May 2017
Thanks Given: 1
Thanks Received: 1


I just verified the indicator is the same as the strategy.


Attached Thumbnails
Click image for larger version

Name:	Please Help2.jpg
Views:	276
Size:	139.0 KB
ID:	246921  
Started this thread Reply With Quote
  #4 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,738 since Jul 2012
Thanks Given: 1,918
Thanks Received: 7,487


miklburns View Post
I just verified the indicator is the same as the strategy.

Checking code is not enough...

Are you 100% positive that both calculations start on the exact same bar? With an indicator the "barsback" is usally autodetected, but you have to set it in a strategy.

This sort of thing will matter if your calculations are dependent on the starting point. I'm guessing AccumSwingIndex is starting point dependent.

That is why I suggested using print statement. Did you try it? What does it say?


Follow me on X Reply With Quote
  #5 (permalink)
 miklburns 
Phoenix AZ
 
Experience: Beginner
Platform: Tradestation
Broker: Tradestation
Trading: Any
Posts: 5 since May 2017
Thanks Given: 1
Thanks Received: 1


kevinkdog View Post
Checking code is not enough...

Are you 100% positive that both calculations start on the exact same bar? With an indicator the "barsback" is usally autodetected, but you have to set it in a strategy.

This sort of thing will matter if your calculations are dependent on the starting point. I'm guessing AccumSwingIndex is starting point dependent.

That is why I suggested using print statement. Did you try it? What does it say?

I guess I haven't gotten that far in my studies. I don't know how to use a print statement to verify a strategy, or how to set bars back. Thank you for pointing me in a direction.


Started this thread Reply With Quote
  #6 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,738 since Jul 2012
Thanks Given: 1,918
Thanks Received: 7,487


miklburns View Post
I guess I haven't gotten that far in my studies. I don't know how to use a print statement to verify a strategy, or how to set bars back. Thank you for pointing me in a direction.

I gave you the print statement to try, just look at the output in the Print Log / Output bar. You'll have to compare to what the chart says.

In any event, your strategy code looks good, so I do not think that is where the issue is...


Follow me on X Reply With Quote
Thanked by:
  #7 (permalink)
 miklburns 
Phoenix AZ
 
Experience: Beginner
Platform: Tradestation
Broker: Tradestation
Trading: Any
Posts: 5 since May 2017
Thanks Given: 1
Thanks Received: 1

Thank you kevinkdog!

I removed the strategy and then reapplied it and it worked, so your initial thought that the settings between the indicator and strategy were out of synch must have been correct.

Your prompting helped me learn how to use the Print Log (and associated formatting).

Mike


Attached Thumbnails
Click image for larger version

Name:	Please Help3.jpg
Views:	225
Size:	139.2 KB
ID:	246936  
Started this thread Reply With Quote
Thanked by:




Last Updated on February 16, 2018


© 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