logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Carbonmimeti  
#1 Posted : Wednesday, February 8, 2012 6:49:24 AM(UTC)
Carbonmimeti

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

henry1224  
#2 Posted : Wednesday, February 8, 2012 11:04:16 AM(UTC)
henry1224

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






mstt  
#3 Posted : Wednesday, February 8, 2012 3:08:48 PM(UTC)
mstt

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



Carbonmimeti  
#4 Posted : Saturday, February 11, 2012 12:41:07 PM(UTC)
Carbonmimeti

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

jjstein  
#5 Posted : Saturday, February 11, 2012 3:47:57 PM(UTC)
jjstein

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.

mstt  
#6 Posted : Saturday, February 11, 2012 4:27:04 PM(UTC)
mstt

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.png

Roy

jjstein  
#7 Posted : Saturday, February 11, 2012 4:36:22 PM(UTC)
jjstein

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.

Carbonmimeti  
#8 Posted : Wednesday, February 15, 2012 6:41:18 AM(UTC)
Carbonmimeti

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 1/13/2010(UTC)
Posts: 24

Thanks: 1 times
thank's for your reply
Carbonmimeti  
#9 Posted : Wednesday, February 15, 2012 6:44:30 AM(UTC)
Carbonmimeti

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.png

Roy

Roy....are you ROY LARSEN?...I am Enrico....high-low activator multitimeframe...do you remember?

your help is always welcome....

mstt  
#10 Posted : Wednesday, February 15, 2012 11:32:02 AM(UTC)
mstt

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


Carbonmimeti  
#11 Posted : Wednesday, February 15, 2012 10:34:47 PM(UTC)
Carbonmimeti

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)
Similar Topics
Simbols in the EXPERT ADVISOR (Formula Assistance)
by corrado 10/31/2020 2:12:10 PM(UTC)
Expert formula problem with Metastock 16 (Error Messages)
by chrisdr22 6/14/2018 3:48:51 AM(UTC)
Heikin-Ashi expert (Formula Assistance)
by chrisdr22 6/5/2018 8:28:22 AM(UTC)
How do I enter a custom formula into the Expert Advisor? (Custom Formulas)
by MS Support 5/8/2017 4:12:57 PM(UTC)
Explorer formula + expert Please (Formula Assistance)
by hughes1970 3/14/2017 2:30:21 PM(UTC)
Translate an Expert Advisor formula to the indicator builder (Formula Assistance)
by Borsatrader 11/27/2016 6:15:31 PM(UTC)
Ichimoku Kinko Hyo Expert - Tenkan Sen / Kijun Sen Cross / Kumo Breakout Explorer (Formula Assistance)
by Dax 3/26/2016 3:22:11 PM(UTC)
Expert Advisor : Exporting Alert messages to a plain-text file (MetaStock)
by xrousaios 5/19/2015 4:07:02 PM(UTC)
Weekly Expert Advisor Ribbon on Daily Chart (Formula Assistance)
by Andrew7267 4/18/2015 1:52:16 PM(UTC)
About Symbols in Expert Advisor (Advanced Coding Techniques)
by htt1203dms 3/21/2015 2:56:31 PM(UTC)
Newbie Stochastic Diverge Expert (Formula Assistance)
by Chris588 2/13/2015 8:40:14 PM(UTC)
Newbie question for Expert (Formula Assistance)
by ChrisKag 2/9/2015 6:32:36 PM(UTC)
Expert Advisor: Setting 1 condition (Formula Assistance)
by johngoat 12/22/2014 12:51:34 AM(UTC)
aroon expert (Formula Assistance)
by beehoney 7/17/2014 7:28:08 AM(UTC)
Standard Expert in MS revisited (Formula Assistance)
by FormulaPrimer 7/5/2014 9:43:32 PM(UTC)
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.