NexusFi: Find Your Edge


Home Menu

 





Tradestation: entry condition


Discussion in TradeStation

Updated
    1. trending_up 2,203 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:	239
Size:	164.2 KB
ID:	246920  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
 
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)
 kevinkdog   is a Vendor
 
Posts: 3,737 since Jul 2012
Thanks Given: 1,917
Thanks Received: 7,476


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:	259
Size:	139.0 KB
ID:	246921  
Started this thread Reply With Quote
  #4 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,737 since Jul 2012
Thanks Given: 1,917
Thanks Received: 7,476


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,737 since Jul 2012
Thanks Given: 1,917
Thanks Received: 7,476


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:	216
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