| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Strategy Question I'm exploring backtesting but I am a real beginner in strategy I can program a long or short entry with a stop Now I try to add more contracts to a position like this // if c > entryprice + 50 point then // Buy ( "Long2") 10 contracts this bar ; or like that // Buy ( "Long2") 10 contracts next bar at entryprice + 100 point stop ; w/o success All suggestion are welcome Have a nice day aaa ----------------------------------------------------------------------------------- Here is a long entry example {---------------- Long Side ----------------} if marketposition <> 1 then if c > AverageFC( c, 10 ) then Buy ( "LongEntry" ) 100 contracts this bar ; if marketposition = 1 then begin if c < AverageFC( c, 50 ) then Sell ( "LongStop" ) this bar ; Sell ("LongExit") next Bar at LowestFC(low, 10) + 0 point stop ; end; | ||
| |
|
| | #2 | ||
![]() | Re: Strategy Question Charlton | ||
| |
|
| | #3 | ||
![]() | Re: Strategy Question Quote:
ThanX for your gentle help // means that the code after doesn't work // or to give information // so we don't have to take them off It could also be this way { Example 1 if c > entryprice + 50 point then Buy ( "Long2") 10 contracts this bar ; Example 2 Buy ( "Long2") 10 contracts next bar at entryprice + 100 point stop ; } --------------------------------------------- My question is Is this code the way to add more contracts ? If not Can you suggest me an other way ? | ||
| |
|
| | #4 | ||
![]() | Re: Strategy Question Quote:
I am still using TS 2000i and I know you can set the maximum number of contracts and if pyramiding is allowed for the the strategy under the strategy properties in "Format Strategy". Maybe it is the same in the newer versions of TS. The default maximum number of contracts is 1 and pyramiding not allowed. So if yours are still default settings, this might explain why it is not working. | ||
| |
|
| The Following User Says Thank You to sevensa For This Useful Post: | ||
aaa (10-25-2009) | ||
| | #5 | ||
![]() | Re: Strategy Question You are always helpfull with the others and your advices are very good I'm confused because I open oftenly strategy properties and I 've never seen the Position Limits So I allowed up to x entry orders in the same direction and it works fine. Also this is important to put in the beginning of the script [IntrabarOrderGeneration = false] Have a nice evening aaa | ||
| |
|
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tradestation Strategy Question | trbates | Automated Trading | 12 | 10-27-2010 11:07 AM |
| Help with My First Strategy | ptcman | Coding Forum | 25 | 10-08-2009 07:53 AM |
| Strategy for Es | TWI | Automated Trading | 6 | 10-28-2008 02:18 PM |
| Simple fib Strategy | feb2865 | Technical Analysis | 1 | 09-19-2007 06:59 PM |
| ER2 Trading Strategy Question | Soultrader | E-mini Futures Trading Laboratory | 24 | 02-25-2007 08:33 PM |