Rank: Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2010(UTC) Posts: 24
Thanks: 1 times
|
Can I plot two symbols on the same bar with two different formulas?
thank's
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
in the Expert Advisor, you can use the highlight tab to show one symbol or system
in the symbol tab you can then create another system symbol
now when you attach the expert to a chart it will display the colored bars as one system and the arrows as another system
You can also use the ribbon as a third system you can also use alerts as a fourth system,but they will not show up on the chart
Under the highlights tab, the symbol tab and the alert tab you have to be aware of precedence! The highest checked off highlight,symbol or alert will show up on the chart
only the highest precedence highlight will show on the bar chart as a colored bar, only the highest precedence symbol will show on the bar chart as a colored symbol, and the ribbon will show a bullish condition, or a bearish condition or neutral position.
now if you designed a system to plot +1 for long positions,-1 for short positions and 0 for neutral positions in the bullish trend your last line of code would be system =1 , in the bearish trend your last line of code would be system=-1
if you create your indicators to plot the binary signals of systems then you can also use them to plot as many systems as you want. just create a template of the chart.
then open your charts with this template.
one last bit of advice, not all systems are created equal, some are more profitable than others, not all fire off a signal on the same bar.
say you have 5 systems, all profitable but not the same, some have more risk involved, on one bar, system 1 has a buy , systems 2,3 are neutral and systems 4&5 are still bearish, WHAT DO YOU DO? Wait for 3 out of the 5 to show bullish trend? By then you might have missed the buy signal.
The more indicators in a system, the less likely it becomes profitable compared to buy and hold!
hope this helps
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Carbonmimeti
It's not possible to display more than one symbol on any bar, but it is possible to have several formulas trigger the one basic symbol and have a different text label with that symbol for each formula or condition. Label identifiers can be stacked vertically with one character per line, so it's possibble to report several TRUE conditions if you need to. Where this method gets a bit messy is that you may want to have symbol code for every possible combination of conditions, and this can result in a lot of symbol variations.
As one example of this approach I've created an expert for a client that stores the bulk of code in 8 non-displaying highlights (forced FALSE result where the highlight code windows are primarily used as a storage area). The results from these "storage" areas are made available to the Symbol code windows by global varables. The expert has 14 symbol windows ploting one of two possible symbols combined with a unique text label.
Here's an example of the symbol code.
{Symbol Name} {Buy SR2}
Buy:=ExtFml("GV.GetVar","Buy"); SR1:=ExtFml("GV.GetVar","SR1"); SR2:=ExtFml("GV.GetVar","SR2");
Buy AND SR1=0 AND SR2;
And here's the label componet of the graphic that goes with this symbol.
B 2
Another of the symbols is made up like this.
{Symbol Name}
{Sell BR1 BR2}
Sell:=ExtFml("GV.GetVar","Sell"); BR1:=ExtFml("GV.GetVar","BR1"); BR2:=ExtFml("GV.GetVar","BR2");
Sell AND BR1 AND BR2;
Here's the label componet of the graphic that goes with this symbol.
1 2 S
Global variables provide a very effective way of transferring data between expert sections and windows within a section. The only constraint that I'm aware of is that the GV must be created in a section or window to the left or above the section or window where it will be used. Creating symbols, highlights (or whatever) that don't generate an output is as simple as adding FALSE; at the end of the code.
You could create an expert to perform the same level of functionalty using formulas called from the Indicator Builder, but they would be OH SO SLOOOOOW.
I hope this helps
Roy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2010(UTC) Posts: 24
Thanks: 1 times
|
I know that I can obtain the same result with plotting indicators but I wanted symbols on the same bars...it is important with my time count.
Thank you for your answers
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
One quick solution is to use multiple entries, with different symbols, colors and/or sizes. The Expert processes from top to bottom. In the Editor, note the arrows at right, beneath the UNCHECK ALL button; you can move the conditions Up or Down, which changes precedence.
Expert SYMBOLS -------------------- Condition A AND Condition B -- Large purple diamond symbol Condition A -- Small blue arrow symbol Condition B -- Small red arrow symbol
If both happen, the topmost entry will plot. Otherwise, they plot individually.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Carbonmimeti That's exactly what you can do using the method I described. You would probably need to select Wingdings or Dingbats as fonts for your "symbol" labels in place of the standard symbols provided by MetaStock. Displaying all possible combinations of four "symbols" would need 16 symbol definitions so there is some work involved setting it up. Colours must be that same for all "symbols" in a stack, but different symbol combinations (different labels) could have differnt colours. Check out a sample at http://www.metastocktips.co.nz/multiple_symbols.pngRoy
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Slick trick, Roy. Am going to have to play with that one.
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2010(UTC) Posts: 24
Thanks: 1 times
|
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2010(UTC) Posts: 24
Thanks: 1 times
|
mstt wrote:Hi Carbonmimeti That's exactly what you can do using the method I described. You would probably need to select Wingdings or Dingbats as fonts for your "symbol" labels in place of the standard symbols provided by MetaStock. Displaying all possible combinations of four "symbols" would need 16 symbol definitions so there is some work involved setting it up. Colours must be that same for all "symbols" in a stack, but different symbol combinations (different labels) could have differnt colours. Check out a sample at http://www.metastocktips.co.nz/multiple_symbols.pngRoy
Roy....are you ROY LARSEN?...I am Enrico....high-low activator multitimeframe...do you remember?
your help is always welcome....
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Enrico
Yes, that's me. I remember creating a custom Multi-Frame formulu for you to test but I've fogotten just why it didn't quite meet your needs. Did you come up with your own solution?
For your interest the April issue of MSTT will have code and a self-installing EXE file demonstrating my method for generating multiple expert symbols on a single bar.
Roy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Unverified Users Joined: 1/13/2010(UTC) Posts: 24
Thanks: 1 times
|
Hi Roy,
the problem was due to the duration of my trading market...from 9 am to 17.30 pm...so the activator 60 minutes was wrong from the open because it started from 17.30 of the previus day so was wrong of 30 minutes....I hope I explain right.
Never mind...now I trade the future Dax: it opens at 8 am and close at 22 pm....so all your indicators are ok.
On a 1 minute chart I plot H-L activator 15-30-60-180
On daily chart I plot weekly and monthly H-L activator
they act like moving average but I use them in a different way....if you are interested with,contact me by email.
Have a good day
Enrico
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.