This is a "Inverse ETF" strategy. The code switches between plotted symbol and a user defined inverse product. Strategy works fine but need some fixing
A. Many attributes related to trading the "Inverse" are missed in visuals.
For example:
Main chart doesn't plot trades (triangles) related to "inverse", though it plots all trade management variables (S/L, Profit Target etc.). While the enclosure shows inverse in separate pane, trade markings are also invisible if Inverse is plotted in the main price pane.
Similarly on "Trade Graph" tab only trades linked to plotted symbol can be parsed and not inverse related whereas both are included in "all" mode displays.
CODE:
Please log in to see this code.
B:
CODE:
Please log in to see this code.
In above if I use
"if (( TMPY [bar] > 0 )" instead of "(( TMPY [bar-1] < 0 ) & ( TMPY [bar] > 0 ))"
it colors the entire area between two boundaries. Where as I think it should only plot/color the signal bar position. Why?
Please help me to refine/fix the code.
Size:
Color:
QUOTE:
Main chart doesn't plot trades (triangles) related to "inverse"
That's correct. This design pattern is used to visualize trades on secondary symbols: FAQ >
Is there a way to see the trades on secondary symbols?QUOTE:
Similarly on "Trade Graph" tab only trades linked to plotted symbol can be parsed and not inverse related whereas both are included in "all" mode displays.
This is OK for context-switching Strategies.
Size:
Color:
Thanks for a quick response.
So, where will I put this in the strategy code?
Size:
Color:
For a more complete illustration of AnnotateBar, find, download and review the "ActiveTrader 2011-05 | Inverse ETF switching system" strategy.
Size:
Color:
QUOTE:
"ActiveTrader 2011-05 | Inverse ETF switching system"
I am aware of that but found it impossible to adapt for my setup. Partly due to lack of comprehension on my part.
Size:
Color:
It's not rocket science, just a two-liner (well, could be one-liner if you eliminate the string variable). Check out the QuickRef entry for AnnotateBar to enhance your comprehension.
Size:
Color:
QUOTE:
It's not rocket science
Yes. still few wrinkles to iron...but moving in the right direction.
Size:
Color: