• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 10:13am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 10:13am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Requesting assistance in modifying MT5 pivot point indicator 0 replies

Requesting Assistance with my MA/RSI EA 6 replies

Programmer assistance requested for Schaff EA 5 replies

Programmer assistance requestef for Schaff EA 0 replies

MT4 Programmer needed for simple custom indicator 3 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 25
Attachments: Requesting programmer assistance with custom indicator
Exit Attachments
Tags: Requesting programmer assistance with custom indicator
Cancel

Requesting programmer assistance with custom indicator

  • Last Post
  •  
  • 1 2Page 34 5
  • 1 2Page 34 5
  •  
  • Post #41
  • Quote
  • Jun 27, 2008 12:37pm Jun 27, 2008 12:37pm
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
Another question is for the multi time frame code would one only get the latest signal represented in a higher time frame? i.e. would the latest 30m signal be represented in the 4h chart or would it draw all over one another? From 4h to 30m i'm sure there is no trouble
 
 
  • Post #42
  • Quote
  • Edited 1:24am Jun 28, 2008 12:49am | Edited 1:24am
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
For reference sake i'm trying to code for whenever the stochastic crosses the 0 line

((sm1>ss1&&sm2<ss2) || sm1==0) is about as far as i've gotten but no cigar. It needs to refer to a previous higher value obviously, going to hunt for a stochastic indicator that shows this
 
 
  • Post #43
  • Quote
  • Jun 29, 2008 1:46am Jun 29, 2008 1:46am
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
I don't suppose anyone could help me out in where the ibarshift has to be declared first and then what it has to be applied to? I would assume it has to apply to the signal when painted however it could just as easily be attached to all the minor indicators.

Sort of stuck and out of several forums I haven't found any helpful threads Re: Making an MTF
 
 
  • Post #44
  • Quote
  • Jun 29, 2008 7:31am Jun 29, 2008 7:31am
  •  falanca
  • Joined Sep 2007 | Status: Member | 350 Posts
I want to know sth about fractals.D o we see the nonrepaitable fractal narow as the bar closes or 2 nd bar closes.And can we make an EA like buy or sell at that time when arrow seen onthe close of second bar.My question is same for SHİ non paintable alerts also.And what is the most convenient method to make an EA with these indicators .
 
 
  • Post #45
  • Quote
  • Jun 29, 2008 8:07am Jun 29, 2008 8:07am
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
Ok well I believe that

Inserted Code
 int i,imax,counted_bars=IndicatorCounted();
 double ao1,ac1,ao2,ac2,sm1,ss1,sm2,ss2;
 if(counted_bars>0) imax=Bars-IndicatorCounted();
 else imax=Bars-1; 
 
 for(i=imax;i>=0;i--)

needs to be replaced with


Inserted Code
   datetime TimeArray[];
   int    i,limit,y=0,counted_bars=IndicatorCounted();
   // Plot defined time frame on to current time frame
   ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);
//----
   limit=Bars-counted_bars;
   for(i=0,y=0;i<limit;i++)
     {
      if (Time[i]<TimeArray[y]) y++;


Am I getting warmer? some direction woudl be fantastic
 
 
  • Post #46
  • Quote
  • Jun 29, 2008 8:51am Jun 29, 2008 8:51am
  •  DaveL
  • | Joined Aug 2006 | Status: Member | 142 Posts
Yes, I suppose that's one way to do it, although I would've used what I originally suggested (iBarShift), since it's more efficient. Same idea, though.

Now, just use your index "y" in your indicator's shift variable to find the appropriate indicator values. Don't forget to use your custom timeframe (looks like your parameter "TimeFrame") in the indicator's timeframe variable, too.
Dave
 
 
  • Post #47
  • Quote
  • Jun 29, 2008 9:36am Jun 29, 2008 9:36am
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
Well obviously i'd prefer the simple method

Inserted Code
 datetime some_time=D'2004.03.21 12:00';   int      shift=iBarShift("EUROUSD",PERIOD_M1,some_time);   Print("shift of bar with open time ",TimeToStr(some_time)," is ",shift);

So I can just use this? Obviously it seems like less code, yay for me.

Does this not rely on any other code and can be used for my expressed purpose?
 
 
  • Post #48
  • Quote
  • Jun 29, 2008 2:01pm Jun 29, 2008 2:01pm
  •  DaveL
  • | Joined Aug 2006 | Status: Member | 142 Posts
Yup - that's the idea, although in your example, you use a fixed reference date.

For a more general solution, you can use
Inserted Code
some_time=Time[i]
and cycle through previous bars (by looping through i, for instance).
Dave
 
 
  • Post #49
  • Quote
  • Jun 29, 2008 2:16pm Jun 29, 2008 2:16pm
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
datetime some_time=Time[i]
int shift=iBarShift(NULL,PERIOD_H4,some_time);
Print("shift of bar with open time ",TimeToStr(some_time)," is ",shift);

Getting a 'shift variable not defined' error.

Again I admit to complete ignorance and please be aware I am merely trying to logically assess what goes where with no reference point because I don't have any examples to work from.
 
 
  • Post #50
  • Quote
  • Jun 29, 2008 2:23pm Jun 29, 2008 2:23pm
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
Inserted Code
int start() 
{
 int i,imax,counted_bars=IndicatorCounted();
 double ao1,ac1,ao2,ac2,sm1,ss1,sm2,ss2;
 if(counted_bars>0) imax=Bars-IndicatorCounted();
 else imax=Bars-1; 
 
 datetime some_time=Time[i]
 int shift=iBarShift(NULL,PERIOD_H4,some_time);
 Print("shift of bar with open time ",TimeToStr(some_time)," is ",shift);
 
 for(i=imax;i>=0;i--)

Fairly sure that is where I dump this code as the other variables are declared here also. Again I could be wrong.

I'm just not sure why i'm getting a 'shift variable not defined error
 
 
  • Post #51
  • Quote
  • Jun 29, 2008 4:55pm Jun 29, 2008 4:55pm
  •  DaveL
  • | Joined Aug 2006 | Status: Member | 142 Posts
One problem is that your positioning leaves the shift index i out of the loop. That is, if you're looping over i to determine your shift, put all commands which use i inside of your loop. The way you have it, it is outside.

It should be more like this:

Inserted Code
 
int start() 
{
 int i,imax,shift,counted_bars=IndicatorCounted();
 datetime some_time;
 double ao1,ac1,ao2,ac2,sm1,ss1,sm2,ss2;
 
 if(counted_bars>0) imax=Bars-counted_bars;
 else imax=Bars-1; 
 
 for(i=imax;i>=0;i--)
 {
  some_time=Time[i];
  shift=iBarShift(NULL,PERIOD_H4,some_time,false);
  Print("shift of bar with open time ",TimeToStr(some_time)," is ",shift); 
 
  ... etc ...
 
 }
 return(0);
}
Dave
 
 
  • Post #52
  • Quote
  • Jul 4, 2008 7:59am Jul 4, 2008 7:59am
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
I'm trying to add parabolic SAR and I borrowed the code from another thread

double sar1 = iSAR(NULL, time_frame_for_signal, psar, max, 0);
double cl1 = iClose(NULL, 0, 0);

double sar2 = iSAR(NULL, time_frame_for_signal, psar, max, 1);
double cl2 = iClose(NULL, 0, 1);

if cl1>sar1 itl enter exactly on the dot, and always after

if cl1>sar1 && cl2 <sar2 itl only trade the bar of the exact signal


it just doesn't seem to register when I put the code in the buy/sell signal as an additional parameter.

Any hints?
 
 
  • Post #53
  • Quote
  • Jul 4, 2008 8:02am Jul 4, 2008 8:02am
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
as for adding the ibarshift thing I sorta gave up and felt it just easier if I duplicate the indicator, give different style signals for different time frames so I could distinguish them and tell metatrader to show the required indicator for that time frame
 
 
  • Post #54
  • Quote
  • Jul 4, 2008 8:09am Jul 4, 2008 8:09am
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
Another quick question is does anybody know of the existence of a time period section highlighting sort of indicator? i.e. if I want to see the trade for every first friday of the month or only between tue-thur

Doesn't have to really give me any figures for it, it's just a visual aid i'm searching for.

Used the forum search function and did not seem to have much luck.

I would have thought metatrader have that function built in
 
 
  • Post #55
  • Quote
  • Jul 4, 2008 8:19am Jul 4, 2008 8:19am
  •  JackSpade
  • | Joined Jan 2006 | Status: Member | 21 Posts
Hi Omniferum, you could use ObjectCreate(); and ObjectSet(); to create a vertical line or rectangle object to highlight what you want highlighting, cant remember the parameters to those functions off top of head but look in the library section off metaeditor for them under object functions.
 
 
  • Post #56
  • Quote
  • Jul 4, 2008 8:31am Jul 4, 2008 8:31am
  •  Omniferum
  • | Joined Jun 2008 | Status: Member | 100 Posts
i'd have to type in every single time frame though, I only want the visual aid for backtesting
 
 
  • Post #57
  • Quote
  • Jul 5, 2008 7:59am Jul 5, 2008 7:59am
  •  falanca
  • Joined Sep 2007 | Status: Member | 350 Posts
Buy fractals up
Sell fractals down
İs it simple to write tis as a program .İf it is with ssome addings it will be a profitable one will you help me
 
 
  • Post #58
  • Quote
  • Jul 15, 2010 7:34am Jul 15, 2010 7:34am
  •  Macedonia
  • | Joined Jun 2008 | Status: Member | 409 Posts
could a programmer please be generous enough to add something to this custom indicator? I am willing to pay.

The indicator is called "A1K forex index ver 2"


this is what it looks like.(red and blue ma looking lines)
What i need added is a email alert for when a new candle opens above or below the two lines.

i would rely apreciate it. cheers
Attached Image
Attached File(s)
File Type: ex4 A1K FOREX INDEX_Versi2~2 Slope.ex4   3 KB | 172 downloads
 
 
  • Post #59
  • Quote
  • Jul 15, 2010 8:47am Jul 15, 2010 8:47am
  •  sangmane
  • Joined Apr 2009 | Status: MT4 Programmer | 758 Posts
Hi,

Try alert below..
Attached File(s)
File Type: ex4 A1KAlert.ex4   3 KB | 154 downloads
 
 
  • Post #60
  • Quote
  • Jul 15, 2010 8:54am Jul 15, 2010 8:54am
  •  Macedonia
  • | Joined Jun 2008 | Status: Member | 409 Posts
Quoting sangmane
Disliked
Hi,

Try alert below..
Ignored
Thanks sangmane.
have you used it? if so... what does it actualy do?
 
 
  • Platform Tech
  • /
  • Requesting programmer assistance with custom indicator
  • Reply to Thread
    • 1 2Page 34 5
    • 1 2Page 34 5
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023