Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2007, 07:56 PM
iscuba11's Avatar
iscuba11 iscuba11 is offline
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Question This has got me puzzled???

Comment as coded:

PHP Code:
   sComment sComment "STOCHASTIC VALUE   " DoubleToStr(sto1,4) + NL
PHP Code:
double sto1=iStochastic(NULL,0,K,D,SL,MODE_SMA,0,MODE_MAIN,0); 

The program reads the sto1 value and plots it on the graph and uses the value to buy or sell, but the sComment does not read sto1 and only displays a of 0.0000?

I am stumped! Any reasoning why the scomment will not read the sto1??

Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-07-2007, 08:38 PM
HerbertH's Avatar
HerbertH HerbertH is offline
Member
 
Join Date: May 2006
Posts: 88
HerbertH is on a distinguished road
Correct order?

Dave, coded in the right order, this works.
Are you sure the sto1 variable is assigned a value before using it in the comment assignment?
(So, not the order you are showing in your posting....)

To check the sto1 value, include a Print(sto1) statement, to make its actual value showup in the Journal logging.
__________________
Better being out, wishing to be in than being in and wishing to be out.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-07-2007, 10:21 PM
iscuba11's Avatar
iscuba11 iscuba11 is offline
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Will do, and thanks for responding!

Dave
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-07-2007, 11:18 PM
iscuba11's Avatar
iscuba11 iscuba11 is offline
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Unhappy Still confused!!!

Print statement on sto1 reads perfectly, but sComment statement fails to comment properly? I am going to redo the variable and the sComment statement.

Dave
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-07-2007, 11:24 PM
iscuba11's Avatar
iscuba11 iscuba11 is offline
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Smile How do you make the sComment Display size larger??

Program Wizards! Is there any way to make the display on the graph a larger size. My old eyes strain to see the comments - Curious.


Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-08-2007, 04:04 AM
iscuba11's Avatar
iscuba11 iscuba11 is offline
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 400
iscuba11 is on a distinguished road
Unhappy

Quote:
Originally Posted by iscuba11 View Post
Print statement on sto1 reads perfectly, but sComment statement fails to comment properly? I am going to redo the variable and the sComment statement.

Dave
Guess there is a bug in metatrader platform. Contacting metagroup.net to tell them about it. It has something to do with iStochastic and why it will not read and display on the graph as a comment but will print. I re-did the formula and change sto1 to stoch with no change on comment display.


Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-08-2007, 08:26 AM
HerbertH's Avatar
HerbertH HerbertH is offline
Member
 
Join Date: May 2006
Posts: 88
HerbertH is on a distinguished road
Try this

Dave, try this: Put the below 3 lines into your existing start body, just like the example below.
The screenshot shows you the result of running this.

If you still cannot get it to work in your expert, upload or send me the source, then I will take a look at it.
Cheers


Code:
int start()
{

double sto1=iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0);  
Comment("STOCHASTIC VALUE   " + DoubleToStr(sto1,4) + "\n");
return(0);

".... existing start() code..."

}
Attached Images
File Type: jpg Comment.JPG (7.9 KB, 68 views)
__________________
Better being out, wishing to be in than being in and wishing to be out.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-09-2007, 02:12 AM
1Dave7's Avatar
1Dave7 1Dave7 is offline
Member
 
Join Date: Aug 2007
Posts: 82
1Dave7 is on a distinguished road
Smile

It just started working after I repositioned the code in the sComment section. Maybe it had something to do with how my computer was acting recently. It crashed this morning. I had to reformat the harddrive. At least my program, indicators and knowledge base was backed up on a memory stick - Those things are great! Now on to bigger things! Thanks for all your help!

Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump



All times are GMT. The time now is 09:44 PM.