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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Admin  
#1 Posted : Tuesday, August 1, 2006 12:28:49 PM(UTC)
Admin

Rank: Member

Groups: Registered, Registered Users
Joined: 7/31/2006(UTC)
Posts: 15
Location: jack of all trades

I used the bold and underline buttons to format "Code:".
Or you can do <b><u>Code:</u></b> in html mode (that tab is at the bottom of the "Post a New Message" or edit windows).

I then used the indent right button on the toolbar to format the code.

However, in html mode, much better formatting is possible, see the example below.

Code:
Max(H, Ref(C,-1));
Min(H, Ref(C,-1));

Second example done in HTML mode; however, average user won't be able to do this well.


Code: Max(H, Ref(C,-1)); Max(H, Ref(C,-1));



The following example was done in HTML mode too, using the following markup:

<BLOCKQUOTE>

<DIV><STRONG>Code:</STRONG></DIV>
<DIV>Insert your code here </DIV>

</BLOCKQUOTE>

Code:
Insert your code here
Jose  
#2 Posted : Wednesday, August 2, 2006 7:12:41 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
MetaStock code operators () are likely to be messed up by HTML code. And it would be nice to be able to post without needing to be a HTML programmer... Is there any simple solution other than using HTML tags, such as "code buttons" or the old code tags? And how about giving the "all posts read" function some priority? Without this working properly, most new posts will be lost/skipped in the 3,785 existing posts. And, is there any way to remove the silly beer/idea buttons from the post signature below? jose '-)
wabbit  
#3 Posted : Wednesday, August 2, 2006 8:17:14 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Jose,

You can use HTML and/or bbCode in your signature...

and you can still use the bbCode "code" function to post your code...

Code:
{test}
x:=1;
y:=2;
z:=x+y;
z;




[edit]
and if you put it inside the bbCode "quote" block it should look reasonable?

Quote:
Code:
{test}
x:=1;
y:=2;
z:=x+y;
z;

><img src=
Back to top
Jose  
#4 Posted : Wednesday, August 2, 2006 8:23:35 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Wabbit, I do use bbCode in my signature, but I've got no idea where the "beer" & "idea" buttons came from. Code test:
Code:

x:=1;
y:=2;
xy
Nope, greater-than & less-than MetaStock operators don't work within bbCode "code" tags. jose '-)
wabbit  
#5 Posted : Wednesday, August 2, 2006 8:30:16 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
try vanilla HTML in your signature...

... and I see what you mean about the gt and lt .... d'oh :(
StorkBite  
#6 Posted : Wednesday, August 2, 2006 10:23:32 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)

Jose wrote:
Is there any simple solution other than using HTML tags, such as "code buttons" or the old code tags?

It seems to be an obvious oversight, but there is no CODE tag in CS. It is NOT BBcode compliant (and I'm told they don't want it to be.) I knew this would be an issue, and it isn't surprising that you are the first to raise it, so I saved this beta-forum thread to let you know what I know. IMO, right now the easiest solution will be to post all formulas as plain text between your familiar start and stop tags. For example:

---8<---------------------------

{ Nightcrawler sleep cycles and the price of gold }
{ ©Copyright 2006 Jose Silva }
{ http://www.metastocktools.com }

pds:=Input("Sleep time",1,50,21);
.
.
.

---8<---------------------------

Jose wrote:
And how about giving the "all posts read" function some priority?

See related post in this forum. Bottom line, we are waiting on Telligent to add this to the CS feature list. Perhaps v3.0?? I understand it won't be v2.1 or v2.2.

Jose wrote:
And, is there any way to remove the silly beer/idea buttons from the post signature

I saw that last night and thought you had too much beer to drink when you updated your profile! [:S] Now, after reading this, I think we'll chalk it up to another migration glitch. Easy fix.

Thanks so much for this useful feedback. Please keep it coming. Even if I can't get it changed or fixed or whatever, I can hound people pretty good. Of course, you already know that! [;)]

Jose  
#7 Posted : Wednesday, August 2, 2006 7:08:29 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Thanks G - your patience is a real virtue. :)
StorkBite wrote:
IMO, right now the easiest solution will be to post all formulas as plain text between your familiar start and stop tags.  For example:

---8

{ Nightcrawler sleep cycles and the price of gold }
{ ©Copyright 2006 Jose Silva }
{ http://www.metastocktools.com }

pds:=Input("Sleep time",1,50,21);
.
.
.

---8

This is a real problem - without HTML tags, "" code operators just don't post: ---8<--------------------------- { 5 is less than 6 } 5<6 ---8<--------------------------- Even the cut-and-paste lines refuse to display. Without a simple way to post code reliably, we are dead in the water... jose '-)
hayseed  
#8 Posted : Wednesday, August 2, 2006 9:32:24 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey g...... what are yall talking about.... are you having trouble with .....h

---------------
6>5
--------------


tema

pds1:=Input("short moving average",1,100,12);

pds2:=Input("long moving average ",1,200,26);

pds3:=Input("signal moving average",1,200,9);

pds4:=Input("tema periods",2,50,14);

0;

x:= Tema(C ,pds4 ) ;

a:=Mov(x ,pds1 ,E )- Mov(x ,pds2 ,E );

b:=Mov(a,pds3,E);

d:=If((a-b)>Ref((a-b),-1),a-b,0);
dd:=If((a-b)<Ref((a-b),-1),a-b,0);

b;

d*2;

dd*2;

a;

StorkBite  
#9 Posted : Wednesday, August 2, 2006 9:34:32 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)

Jose wrote:
Without a simple way to post code reliably, we are dead in the water...

Agreed. Let's try to figure out what'll work, then see if I can get a button made to automate it.

The following examples were entered as plain text in "Design" mode, not "HTML" mode:

---8<---------------------------

is 5<6?

is 5<6

is 5< 6

is 5 <6

is 5 < 6

is 5 < 6 < 7

is 5<6 or 6>5

---8<---------------------------

The following examples were entered as plain text in "Design" mode, not "HTML" mode. Next, I highlighted all of the text and hit the Indent Button from the toolbar. It surrounded the text with the frame.

---8<---------------------------

is 5<6?

is 5<6

is 5< 6

is 5 <6

is 5 < 6

is 5 < 6 < 7

is 5<6 or 6>5

---8<---------------------------

hayseed  
#10 Posted : Wednesday, August 2, 2006 9:50:39 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

yall must be doing something different than me.... can't see the issue....h



 
 
MetaStock -> Tools -> Indicator Builder -> New
Copy and paste formula below.


===================
EMA, cycle-adaptive
===================
---8<---------------------------

{ Cycle-adaptive Exponential Moving Avg v1.1 }
{ EMA periodicity determined by historical
 price cycle based on ZigZag cycles }
{ ©Copyright 2004 Jose Silva }
{ http://www.metastocktools.com }

pr:=Input("ZigZag cycle reversal %",0,100,5);
choose:=Input("EMA periods based on: [1]Cycle, [2]Cycle Avg",1,2,1);
multi:=Input("EMA periodicity: Cycle/Avg length x",.1,100,2);
x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 P=6",1,6,6);
shift:=1+Input("EMA vertical shift %",
 -100,100,0)/100;
plot:=Input("[1]EMA [2]Signals [3]Cycle [4]CyAvg [5]CyStdDev",1,6,1);

x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
zz:=Zig(x,pr,%);
zzpk:=Ref(zz,-1)>zz AND Ref(zz,-1)>Ref(zz,-2);
zztr:=Ref(zz,-1)<zz AND Ref(zz,-1)<Ref(zz,-2);
PkTr:=zzpk OR zztr;
CycleLen:=PkTr*(Ref(BarsSince(PkTr),-1)+1);
CycleCount:=Cum(PkTr)-1;
CycleCount:=If(CycleCount=0,.000001,CycleCount);
CycleLenAvg:=Cum(CycleLen)/CycleCount;

pds:=If(choose=1,ValueWhen(1,CycleLen>0
 AND CycleCount>0,CycleLen),CycleLenAvg)*multi;
Init:=CycleCount=1 AND Alert(CycleCount<1,2);
pds:=
 If(pds>BarsSince(Init),BarsSince(Init),pds);
pds:=If(pds<1,1,pds);
Ema:=x*2/(pds+1)+PREV*(1-2/(pds+1));
Ema:=Ema*shift;
signals:=Cross(x,Ema)-Cross(Ema,x);

If(plot=1,Ema,If(plot=2,signals,
 If(plot=3,CycleLen,
 If(plot=4,CycleLenAvg,
 If(plot=5,Stdev(CycleLen,21),pds)))))

---8<---------------------------


http://www.metastocktools.com

StorkBite  
#11 Posted : Wednesday, August 2, 2006 10:21:46 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
I think we are looking at the problem of not having a feature comparable to the bbcode CODE tags. It seems like plain text is all that we have (for the moment). I want to get this resolved 100% to Jose's satisfaction. Whatever we need to do, I'll find the person to help make it happen.
Jose  
#12 Posted : Thursday, August 3, 2006 12:09:40 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Thanks G. Test: { x greater than y } x>y { x less than y } x
StorkBite  
#13 Posted : Thursday, August 3, 2006 10:33:22 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)

x<y

x< y

x <y

X<Y

X< Y

X <Y

I will look into your HTML question. I think we might be able to mod the forum and accomplish that request.

StorkBite  
#14 Posted : Friday, August 4, 2006 2:19:37 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)

This is not a solution, but an explanation. Using the RichText Editor is problematic for Opera users. The only current alternatives are 1) don't use Opera, or 2) use HTML formatting. I purposely left off option 3.

Are you using Opera? If so, then that is why you are not seeing the more feature filled post editor. Most Rich Text / WYSIWYG editors do not work with Opera because Opera does not support a built-in HTML editing library like IE and FireFox/Mozilla do.

The defeault editor in CS is FreeTextBox which renders a plain small box in Opera. A plain textbox editor (where you enter any HTML you want to use manually) is also included. You will probably want to change your editor to that.

1. Edit your profile by clicking on your username in the top-right of the screen.

2. Click on the SiteOptions tab.

3. Change the Content editor dropdown value from Rich Editor to DefaultTextEditor (which is the plain textbox).

4. Click the Save Changes button.

StorkBite  
#15 Posted : Friday, August 4, 2006 11:36:39 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)

TinyMCE, has been introduced in CS 2.1 beta. It looks awesome and appears to be customizable too. Perhaps this Content Editor upgrade will be what the doctor ordered?

Can any of you Opera users verify that javascript will work better for you than rich content?

http://tinymce.moxiecode.com/example_full.php?example=true

StorkBite  
#16 Posted : Friday, August 4, 2006 5:16:52 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)

Update:

Actually I have good news in the Opera department!

CS 1.x and 2.0 were shipped with FreeTextBox as the default rich text editor and it did not work (or work well) with Opera and some other less widely used browsers.

CS 2.1 will have an all new default editor named TinyMCE which is lighter weight and works in more browsers, including Opera 9! In fact I am writing this post in Opera 9.01 and the post editor works great. The only caveat is that older versions of Opera will need to be upgraded to 9.0x to use the editor.

StorkBite  
#17 Posted : Wednesday, August 9, 2006 12:49:22 AM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)

We've been trying to come up with an alternative solution to simulate the old code tags. What we've come up with is this: Surround your code in these tags (no brackets and no spaces)

* code *

Insert code here...

* /code *

Should look like this:

Code:

---8<---------------------------

{ Cycle-adaptive Exponential Moving Avg v1.1 }
{ EMA periodicity determined by historical
 price cycle based on ZigZag cycles }
{ ©Copyright 2004 Jose Silva }
{ http://www.metastocktools.com }

pr:=Input("ZigZag cycle reversal %",0,100,5);
choose:=Input("EMA periods based on: [1]Cycle, [2]Cycle Avg",1,2,1);
multi:=Input("EMA periodicity: Cycle/Avg length x",.1,100,2);
x:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 P=6",1,6,6);
shift:=1+Input("EMA vertical shift %",
-100,100,0)/100;
plot:=Input("[1]EMA [2]Signals [3]Cycle [4]CyAvg [5]CyStdDev",1,6,1);

x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
zz:=Zig(x,pr,%);
zzpk:=Ref(zz,-1)>zz AND Ref(zz,-1)>Ref(zz,-2);
zztr:=Ref(zz,-1)<zz AND Ref(zz,-1)<Ref(zz,-2);
PkTr:=zzpk OR zztr;
CycleLen:=PkTr*(Ref(BarsSince(PkTr),-1)+1);
CycleCount:=Cum(PkTr)-1;
CycleCount:=If(CycleCount=0,.000001,CycleCount);
CycleLenAvg:=Cum(CycleLen)/CycleCount;

pds:=If(choose=1,ValueWhen(1,CycleLen>0
AND CycleCount>0,CycleLen),CycleLenAvg)*multi;
Init:=CycleCount=1 AND Alert(CycleCount<1,2);
pds:=
If(pds>BarsSince(Init),BarsSince(Init),pds);
pds:=If(pds<1,1,pds);
Ema:=x*2/(pds+1)+PREV*(1-2/(pds+1));
Ema:=Ema*shift;
signals:=Cross(x,Ema)-Cross(Ema,x);

If(plot=1,Ema,If(plot=2,signals,
If(plot=3,CycleLen,
If(plot=4,CycleLenAvg,
If(plot=5,Stdev(CycleLen,21),pds)))))

---8<---------------------------

Note: this does not show the custom format in the Preview Window. Just post it and it'll show up.

Jose  
#18 Posted : Wednesday, August 9, 2006 4:47:38 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Test for posting code with Opera browser v9.01:
Code:

===========================
Holy Grail MkIV Long system
===========================
---8
{ Holy Grail Long MkIV system signals v7.5 }
{ Warning: Xperimental only - *Do Not Trade!* }

{ Ignore all signals without matching
 MkIV Money Management module!
 Enter Long = +1 (Close)
 Exit Long = -1 (Close)
 For JSE markets only.}

{ ©Copyright 2005 Jose Silva }
{ http://www.metastocktools.com }

pds:=Input("Avg trade frequency",2,500,21);
pdsN:=Input("Fibonator normalizing periods (1=none)",1,260,1);
vFilter:=Input("Inactivity filter? [1]Yes, [0]No",0,1,1);
delay:=Input("Entry and Exit delay",0,5,0);
plot:=Input("[1]Signals, [2]Trade binary",1,2,1);

vFilter:=If(vFilter=1,HHV(C,pds)>LLV(C,pds)*1.05,1);
FibSeriesSum:=1+1/1+1/2+1/3+1/5+1/8+1/13+1/21+1/34+1/55+1/89+1/144+1/233+1/377+1/610;
FibSeriesSumVal:=Frac(FibSeriesSum+LastValue(DPO(pds)+PREV-PREV)-FibSeriesSum);
FibSeriesSumValNorm:=(FibSeriesSumVal-LLV(FibSeriesSumVal,pds))/(HHV(FibSeriesSumVal,pds)-LLV(FibSeriesSumVal,pds)+.000001)*100;
avg:=Cum(FibSeriesSumValNorm)/Cum(IsDefined(FibSeriesSumValNorm));
pk:=Ref(FibSeriesSumValNorm,-1)=HHV(FibSeriesSumValNorm,3) AND Ref(FibSeriesSumValNorm,-1)>avg;
pkVal:=ValueWhen(1,pk,Ref(FibSeriesSumValNorm,-1));
pkAvg:=Cum(pkVal)/Cum(IsDefined(pkVal));
tr:=Ref(FibSeriesSumValNorm,-1)=LLV(FibSeriesSumValNorm,3) AND Ref(FibSeriesSumValNorm,-1)<avg;
trVal:=ValueWhen(1,tr,Ref(FibSeriesSumValNorm,-1));
trAvg:=Cum(trVal)/Cum(IsDefined(trVal));
entryLong:=Cross(FibSeriesSumValNorm,trAvg) AND vFilter;
exitLong:=Cross(FibSeriesSumValNorm,pkAvg);
InitSequence:=Cum(IsDefined(entryLong+exitLong))=1;
x:=ValueWhen(1,entryLong-exitLong0,entryLong-exitLong);
entryLong:=x=1 AND (Alert(x1,2) OR InitSequence);
exitLong:=x=-1 AND (Alert(x-1,2) OR InitSequence);
binary:=ValueWhen(1,entryLong-exitLong0,entryLong-exitLong);

{ Plot in own window }
Ref(If(plot=1,entryLong-exitLong,binary),-delay)

---8
Code:

Close
The code tags seem to work Ok without any spaces between the asterisks. Unfortunately some code inside the code box is still treated as HTML (e.g., less-than operator). jose '-)
zemackdaddy  
#19 Posted : Wednesday, August 9, 2006 10:13:51 AM(UTC)
zemackdaddy

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/17/2006(UTC)
Posts: 55

Was thanked: 1 time(s) in 1 post(s)
Yes, you have to use * code * and * /code * without the spaces after the *.

Which line exactly, has the < problem?
Jose  
#20 Posted : Wednesday, August 9, 2006 11:23:19 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
To simplify it:
Code:

{ x is less than y, no space }
x
Users browsing this topic
Guest (Hidden)
2 Pages12>
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.