NexusFi: Find Your Edge


Home Menu

 





Turn Conditions on and Off


Discussion in TradeStation

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




 
Search this Thread

Turn Conditions on and Off

  #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?
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
REcommedations for programming help
Sierra Chart
 
  #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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

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 Twitter 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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

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 Twitter Reply With Quote




Last Updated on August 17, 2013


© 2024 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 - Privacy Policy - Downloads - Top
no new posts