NexusFi: Find Your Edge


Home Menu

 





Turn Conditions on and Off


Discussion in TradeStation

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




 
Search this Thread
  #1 (permalink)
 haonkered 
Houston, Texas, United States
 
Experience: Advanced
Platform: TradeStation
Trading: Futures
Posts: 25 since Jun 2013
Thanks Given: 10
Thanks Received: 5

Is it possible in strategy optimization to input easy language code to toggle certain conditions on and off. Say I am interested in running a scenario of approximately 14 conditions. Condition1, Condition2, etc. But at some point their are going to be too many so I would like to be able to turn conditions on and off to test the multiple combinations of conditions all while doing optimization.

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)
 
malibu's Avatar
 malibu 
toronto canada
 
Experience: Advanced
Platform: Matlab + NT + TS
Trading: FOREX
Posts: 65 since Jul 2013
Thanks Given: 9
Thanks Received: 17


haonkered View Post
Is it possible in strategy optimization to input easy language code to toggle certain conditions on and off. Say I am interested in running a scenario of approximately 14 conditions. Condition1, Condition2, etc. But at some point their are going to be too many so I would like to be able to turn conditions on and off to test the multiple combinations of conditions all while doing optimization.

Thanks

Just use the "and" operator and comment out the conditions you want to skip for a certain test run. For example,

If condition1
// and condition2
and condition3 then
action

would perform the action (buy, sell, ... etc) if conditions 1 and 3 were met. "//" takes the "and condition2" out of the picture. I think that should work. There are much more efficient ways of doing this, but I think this is the simplest.


Reply With Quote
  #3 (permalink)
 haonkered 
Houston, Texas, United States
 
Experience: Advanced
Platform: TradeStation
Trading: Futures
Posts: 25 since Jun 2013
Thanks Given: 10
Thanks Received: 5


Yes that would work but it is too labor intensive to try to go through all the possible combinations which is why I was trying to toggle between condition on/off through some type of optimization code


Started this thread Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642

Use your own variables for the conditions and use 0 for false and 1 for true. Then you can optimize for that.

Regards,
ABCTG


Follow me on X Reply With Quote
  #5 (permalink)
 
malibu's Avatar
 malibu 
toronto canada
 
Experience: Advanced
Platform: Matlab + NT + TS
Trading: FOREX
Posts: 65 since Jul 2013
Thanks Given: 9
Thanks Received: 17


ABCTG View Post
Use your own variables for the conditions and use 0 for false and 1 for true. Then you can optimize for that.

Regards,
ABCTG

took the words outta my mouth.


Reply With Quote
  #6 (permalink)
 haonkered 
Houston, Texas, United States
 
Experience: Advanced
Platform: TradeStation
Trading: Futures
Posts: 25 since Jun 2013
Thanks Given: 10
Thanks Received: 5

Makes sense but I am still confused. Could you show me a simple example


Started this thread Reply With Quote
  #7 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642

I don't know if this example helps you, as we don't know what you are trying to do exactly.

Where you would usually have something like:

 
Code
if Condition1 = true then
 Buy next bar market;
you would change this to

 
Code
if MyCondition1 = 1 then
 Buy next bar market;
In this case MyCondition1 would be an input and if it's 1 it's true, otherwise it's false. This can be optimized now.

Regards,
ABCTG


Follow me on X Reply With Quote




Last Updated on August 17, 2013


© 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