TASC 2010-01 | Vortex Indicator questions
Author: wphill
Creation Date: 11/9/2010 2:55 PM
profile picture

wphill

#1
My buys are based on a rotational asset allocation strategy. But, to protect loss and profits I like having a routine for screening to take action for a pre-mature sell not necessarily triggered by the buy program. Wiki has an interesting combination of a directional indicator (Vortex) that is combined with an ATR as a trailing loss signal.

Is there a descriptive discussion of this code anywhere? I see dotted lines...green, red, or blue. I assume that these lines are related to the atr levels. A buy requires a combination of the directional indicator to be positive and for the price to be above the atr level. A sale would require only a breach of the atr? I would like to know for sure and what specifically is required for either a sell or a buy. Shorting and Covering or part of the code; but this does not interest me.

Unfortunately, my knowledge base does not include c# coding. I have loaded the code but need to have a narrative to really have a sense of what is under the hood.

Last, how would make the atr levels more bold on the chart?using System; and,
how could I remove the shorting/covering in order to clean up the chart?

Thanks!

wiki source:
http://www2.wealth-lab.com/WL5Wiki/TASCJan2010.ashx?HL=vortex



CODE:
Please log in to see this code.


profile picture

Eugene

#2
QUOTE:
how could I remove the shorting/covering in order to clean up the chart?

Obviously, by commenting out the system's AtShort entries.
profile picture

urielt

#3
looking to have the option only long entry and sell when CMO above 50
profile picture

Eugene

#4
Have you tried commenting out the short entry, like suggested above?
profile picture

urielt

#5
yes i did. i need help to integrate "sell" when CMO is above 50
profile picture

Eugene

#6
Hope this helps to get you started:

1. WealthScript Programming Guide, DataSeries > Accessing a Single Value from a DataSeries. Check out example #2.
2. CMO indicator syntax
profile picture

urielt

#7
that how i comment out the short entry, please advice

CODE:
Please log in to see this code.
profile picture

Eugene

#8
1. Commenting out ShortAtStop = fine.
2. Commenting CoverAtStop/CoverAtTrailingStop - possible but not required (no short entries = no exit signal(s).
3. Now, commenting SellAtStop/SellAtTrailingStop is a mistake. A trade would never be exited, once open.
profile picture

urielt

#9
Thanks, the reason commenting SellAtStop/SellAtTrailingStop i am trying to achieve to "exit" when CMO is above 50, how i should go about that?
profile picture

Eugene

#10
Got it.

Re: CMO above 50, see my reply dated 11/22/2010 5:18 AM. I'm deliberately not posting any ready made code example, because 1) it's documented in the guide and 2) it's a very basic scripting skill learning which would only benefit you, there's nothing tricky about it even for newbies (and I couldn't call you a newbie).