Buy/Sell Signals for Secondary Instrument Not Visible
Author: Harapa
Creation Date: 11/28/2016 8:37 PM
profile picture

Harapa

#1
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.
profile picture

Eugene

#2
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.
profile picture

Harapa

#3
Thanks for a quick response.
So, where will I put this in the strategy code?
profile picture

Eugene

#4
For a more complete illustration of AnnotateBar, find, download and review the "ActiveTrader 2011-05 | Inverse ETF switching system" strategy.
profile picture

Harapa

#5

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.
profile picture

Eugene

#6
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.
profile picture

Harapa

#7
QUOTE:
It's not rocket science


Yes. still few wrinkles to iron...but moving in the right direction.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).