Pivot Indicator for MT5 - Forex Forum - EarnForex
Forex Forum - EarnForex
Serving Traders Since 2005
 

Go Back   Forex Forum - EarnForex > MetaTrader > MetaTrader Indicators

MetaTrader Indicators Post and discuss the MetaTrader indicators here.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 4th January 2010, 12:46
Default Avatar
Member
 
Join Date: Dec 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pivot Indicator for MT5

This is my first attempt to code a pivot line for MT5. Is anybody willing and able to help me?

First piece of code is attached.
Attached Files
File Type: mq5 Pivot.mq5 (4.3 KB, 25 views)

Last edited by fxwalb; 4th January 2010 at 16:15.
Reply With Quote
  #2 (permalink)  
Old 4th January 2010, 16:42
Enivid's Avatar
Administrator
 
Join Date: Nov 2008
Posts: 2,085
Thanks: 72
Thanked 109 Times in 66 Posts
Default

There are syntax errors in the attached indicator.
Reply With Quote
  #3 (permalink)  
Old 4th January 2010, 18:51
Default Avatar
Member
 
Join Date: Dec 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Enivid View Post
There are syntax errors in the attached indicator.
Yes you are true, the compiler notes two errors. but unfortunatly I don't know how to fix it.
Reply With Quote
  #4 (permalink)  
Old 4th January 2010, 22:08
Enivid's Avatar
Administrator
 
Join Date: Nov 2008
Posts: 2,085
Thanks: 72
Thanked 109 Times in 66 Posts
Default

You declare your functions incorrectly. In declarations of the functions you should mention only the types and the names of the parameters, not the values (or other functions). Example of a correct declaration:

double func(int a, double b, long c)
{
//bla bla bla
return a+b+c;
}
Reply With Quote
  #5 (permalink)  
Old 5th January 2010, 07:45
Enivid's Avatar
Administrator
 
Join Date: Nov 2008
Posts: 2,085
Thanks: 72
Thanked 109 Times in 66 Posts
Default

You can't declare functions inside the other functions' declarations. Place them outside of all other functions.
Reply With Quote
  #6 (permalink)  
Old 5th January 2010, 09:02
Enivid's Avatar
Administrator
 
Join Date: Nov 2008
Posts: 2,085
Thanks: 72
Thanked 109 Times in 66 Posts
Default

It has some errors with the misplaced spaces, but except for that it looks to be correct.
Reply With Quote
  #7 (permalink)  
Old 5th January 2010, 11:06
Default Avatar
Member
 
Join Date: Dec 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Enivid View Post
It has some errors with the misplaced spaces, but except for that it looks to be correct.
Thanks for your help. I fixed it.

Last edited by fxwalb; 6th January 2010 at 08:40.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RSI Signal (Buy\Sell Indicator) - GREAT signal indicator MechXTrader MetaTrader Indicators 1 16th March 2013 08:08
Macd divergence, stochastic and pivot lines Austorious Trading Systems and Strategies 4 21st September 2009 04:11
Pivot Systems for Metatrader MT4 fxalgotrader Advertisements 0 12th September 2009 20:22


All times are GMT. The time now is 11:35.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Inactive Reminders By Icora Web Design

SEO by vBSEO 3.3.2