toronto canada
Experience: Advanced
Platform: Matlab + NT + TS
Trading: FOREX
Posts: 65 since Jul 2013
Thanks Given: 9
Thanks Received: 17
|
So I am not quite sure what you're looking for, but I'll take a stab. In tradestation the functions highest and lowest may be of some help. So for example, if you are looking to identify and use the high of previous seven days, try highest(high,7). If you're are looking for the lowest low of the previous seven, then use lowest(low,7). In other words, if you want to sell short when the close crosses above the high of the previous 7 days , and reverse with a long when the close crosses below the low of the previous 7 days do this:
If close crosses under lowest(low,7) then buy next bar at market;
If close crosses above highest(high,7) then sell short next bar at market;
This, of course, is in easy language. However, most of these languages are very similar so transposition is not that difficult... most of the time.
Hope this helps.
|