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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Need Help Coding Price Action Indicator 14 replies

Need help coding an idea for an Indicator or EA 0 replies

Need help coding a Simple Indicator 0 replies

Need Help Coding an Indicator MT4 6 replies

Need help on coding momo indicator 2 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 28
Attachments: Need Big Help on Indicator Coding
Exit Attachments

Need Big Help on Indicator Coding

  • Last Post
  •  
  • 1 Page 23 4
  • 1 Page 23 4
  •  
  • Post #21
  • Quote
  • Mar 13, 2012 12:39pm Mar 13, 2012 12:39pm
  •  Kendal
  • | Joined Dec 2006 | Status: Member | 44 Posts
Sounds good. crodzilla may be willing to give some guidelines if you ask him, if he won't give the full source code.
  • Post #22
  • Quote
  • Edited Mar 15, 2012 7:22am Mar 14, 2012 8:22am | Edited Mar 15, 2012 7:22am
  •  fxtr51
  • Joined Jan 2010 | Status: Member | 1,163 Posts
I didnīt ask crodzilla, this is my own creation (my first dashboard).

How to use the dashboard

- Copy Cobra_3 and Cobra_Dashboard_V1 into the experts/indicators folder
and restart Mt4.

- Only Cobra_Dashboard_V1 needs to be attached to a chart
(I added a template for convenience)

- Choose pairs and timeframes and Alerts in properties menu

- When attached for the first time, it has to check all the timeframes and pairs. It takes time.
Depending on your PC, it might look like Mt4 freezes, donīt worry, it
will unfreeze.

- Grey Cells mean that there isnīt enough historical data for that timeframe of that pair.
Solution: Open a new chart of that pair and click on the missing timeframe
and force Mt4 to get historical data from your broker.

One simple method: left-click inside the chart-frame and hold and move the mouse-pointer to the right side. This forces a download of history data
from your broker and soon the grey cell will be filled with an arrow.

- You can choose other pairs in the input properties menu and you can delete pair-names which will result in grey cells for that row.

http://i.imgur.com/JYgvm.jpg

How to read the Cobra_Dashboard

- Each cell shows the last arrow of the pair and timeframe.
The arrow stays until the signal changes.

- Each signal change will give an Alert (Popup window with sound).
The Popup window will show the pair name and period.
As usual such a popup window disappears only when you click on "OK".
The text of the alert can be found in the Experts-tab log too.

- Choose the Alerts you want to have
Popup, e-mail


Update: Cobra_Dashboard_V1 uploaded
- fully customizable
choose pairs
choose timeframes (periods)
- will only show the chosen pairs and periods

Cobra_2 is not needed anymore.
Cobra_3 needs to be in experts/indicators folder
You can attach Cobra_3 without the dashboard on the pair(s) you trade.
Attached Files
File Type: tpl ! cobra dashboard.tpl   5 KB | 516 downloads
File Type: ex4 Cobra_Dashboard_V1.ex4   16 KB | 600 downloads
File Type: ex4 Cobra_3.ex4   12 KB | 606 downloads
  • Post #23
  • Quote
  • Mar 14, 2012 1:39pm Mar 14, 2012 1:39pm
  •  Saintsurfer
  • Joined Aug 2009 | Status: Member | 733 Posts
Would be nise be able to choose the time frames to show for the dashboard...
  • Post #24
  • Quote
  • Mar 14, 2012 1:57pm Mar 14, 2012 1:57pm
  •  Kendal
  • | Joined Dec 2006 | Status: Member | 44 Posts
Very cool fxtr51. Congratulations on your first dashboard. I'm testing it now.

BTW +73 pips on the USDJPY trade from a couple of days ago.
  • Post #25
  • Quote
  • Mar 14, 2012 6:19pm Mar 14, 2012 6:19pm
  •  fxtr51
  • Joined Jan 2010 | Status: Member | 1,163 Posts
Quoting Saintsurfer
Disliked
Would be nise be able to choose the time frames to show for the dashboard...
Ignored
Fully customizable dashboard added.
Choose pairs and timeframes and the dashboard will only calculate and
display the selected items.
  • Post #26
  • Quote
  • Mar 16, 2012 4:34am Mar 16, 2012 4:34am
  •  fxtr51
  • Joined Jan 2010 | Status: Member | 1,163 Posts
After some time the Edit button disappears, therefore I had to post the latest version of the indicator and dashboard here.

Modification: The nagging alert at initialization is removed.
Attached Files
File Type: ex4 Cobra_Dashboard_V2.ex4   16 KB | 584 downloads
File Type: ex4 Cobra_3.1.ex4   12 KB | 591 downloads
File Type: tpl CobraSystem.tpl   2 KB | 510 downloads
  • Post #27
  • Quote
  • Mar 16, 2012 2:52pm Mar 16, 2012 2:52pm
  •  Kendal
  • | Joined Dec 2006 | Status: Member | 44 Posts
Thanks for the update. I've had mixed results with this taking the trades as they come up and using a TP/SL as the mid line of the short term trend bands. Anyone come up with a solid trading plan for this?
  • Post #28
  • Quote
  • Mar 16, 2012 3:51pm Mar 16, 2012 3:51pm
  •  fxtr51
  • Joined Jan 2010 | Status: Member | 1,163 Posts
Quoting Kendal
Disliked
Thanks for the update. I've had mixed results with this taking the trades as they come up and using a TP/SL as the mid line of the short term trend bands. Anyone come up with a solid trading plan for this?
Ignored
The recommended SL is the other side of the blue band, not the midline.

And as usual a trading system cannot be judged after 1 week.
Either it needs to be backtested for a few years or forward tested a few months.

I have seen setups on the historical charts on several pairs which have
a Risk/Reward of 1 : 5 and higher.
Such good moves with pullbacks into the blue bands but not closing
beyond give 2 or 3 additional valid setups where you can add to the
original position and such moves result in huge profits.

If the average win/loss ratio is only 50 %, such moves - and they happen - will guarantee good profits, no doubt about that.

Ok, maybe there are indicators or additional rules which will filter more bad trades and give more profitable entries, but finding them requires work
and experience.

Some find such additional profit enhancers and stay silent and you will never find it shared ....
others will share them .... let us hope for the second category.

It is the old story about "there is no free lunch" and such.

I have done my part and invested many hours coding the indicators.
A professional coder would have done it much much faster but none
appeared here and helped. Why should they ?

They earn money with coding and if a potential profitable strategy
is shared like this one, they silently code an indicator and EA and test it
and use it for themselves to make a living.

My 2 cents.
  • Post #29
  • Quote
  • Mar 16, 2012 5:21pm Mar 16, 2012 5:21pm
  •  Harcourt
  • | Joined Jun 2009 | Status: Member | 6 Posts
Hi, can any one help, as i'm afraid i have no experience of progrmming!
I want to take the AMA indicator and load it onto IG Index's advance charts as a custom indicator.
I have loaded the code (copy below) into the creator, then gone to verify it, the creator is asking to define variable P (query box screen grab in .doc attached plus coding and desired MT4 settings) I have also attached a different AMA MT4 file, in case it is easier to alter that?

Fixing this will save me running 2 charting packages, which would be great!
Paul


ONCE ama = UNDEFINED

signal = ABS(MOMENTUM)
noise = SUMMATION(ABS(MOMENTUM[1]))

IF noise>0 THEN
er = signal / noise
ELSE
er=1
ENDIF

fastsc = 2 / (2+ 1)
slowsc = 2 / (30 + 1)

factor = SQUARE(er * (fastsc - slowsc) + slowsc)

IF BARINDEX = p THEN
ama = CLOSE
ELSIF BARINDEX > p THEN
ama = ama + factor * (CLOSE - ama)
ENDIF

RETURN ama
Attached Files
File Type: mq4 AMA.mq4   3 KB | 222 downloads
File Type: doc Variable P box, AMA coding and desired settings.doc   89 KB | 294 downloads
  • Post #30
  • Quote
  • Mar 16, 2012 6:49pm Mar 16, 2012 6:49pm
  •  fxtr51
  • Joined Jan 2010 | Status: Member | 1,163 Posts
Harcourt,
this thread is for the Cobra system only.

What relevance does the AMA indicator have in the Cobra system ?

If none, please start a new thread for the AMA indicator you request.
Maybe somebody will help you.
  • Post #31
  • Quote
  • Mar 16, 2012 7:08pm Mar 16, 2012 7:08pm
  •  adsanders
  • | Joined May 2007 | Status: Member | 137 Posts
Quoting fxtr51
Disliked
The recommended SL is the other side of the blue band, not the midline.

And as usual a trading system cannot be judged after 1 week.
Either it needs to be backtested for a few years or forward tested a few months.

I have seen setups on the historical charts on several pairs which have
a Risk/Reward of 1 : 5 and higher.
Such good moves with pullbacks into the blue bands but not closing
beyond give 2 or 3 additional valid setups where you can add to the
original position and such moves result in huge profits.

If the average win/loss ratio is...
Ignored
FXtr51... I just wanted to say thanks for all the work you have done on this! It is much appreciated.
  • Post #32
  • Quote
  • Mar 17, 2012 12:26pm Mar 17, 2012 12:26pm
  •  Whenever
  • Joined Aug 2010 | Status: Member | 428 Posts
Quoting fxtr51
Disliked

They earn money with coding and if a potential profitable strategy
is shared like this one, they silently code an indicator and EA and test it
and use it for themselves to make a living.

My 2 cents.
Ignored
Use it for themeselves and sell it too I guess

Great work, FXTR51 and I hope it will give you (and others too) the wished results.

By the way (please consider that I have no clue at all about coding and also I had not the time yet to check your indi live on the chart) I had another thought about the EA:

You made a very good indicator for the entry candles.

Would it be possible to make an EA which "just" look if the arrow appears and in this case automatically by the open of the next bar it opens a trade with a lot size calculated considering the distance of the price from the lower(or higher) blue band of the 3 and making that distance in pips for example 2% of the actual account balance ?

Of course then the close (also of all previous added trades, if any) as per TS should be as soon as a candle closes over the blue band (up or down, as per TS, you know what I mean)

At the beginning, to make things not too complicated, it could be without any trailing SL (or just to BE as soon as the gain in pips = SL pips from entry)

I would be interested in your opinion.

Thanks again a lot for the Indis and I will try to follow the forward testing as well (as much as my slave job allows)


  • Post #33
  • Quote
  • Mar 18, 2012 7:51am Mar 18, 2012 7:51am
  •  fxtr51
  • Joined Jan 2010 | Status: Member | 1,163 Posts
Thanks to all who thanked me for the indicator and dashboard.

On first sight the Cobra System looks promising but I know from so many other good looking trading strategies which went into the recycle bin
after an EA was coded and backtests were run.

The same seems to be the case here.
I coded the Cobra_EA and here is a backtest on EURUSD H1 for 2011
on Alpari broker.
http://i.imgur.com/xW0vT.jpg

The EA has everything which is in the manual.
1. ADX Filter
2. MA-bands Filter
3. Exit on closed candle on other side of blue bands
4. Move SL every 10 Pips in profit until SL = OpenPrice of trade.
5. no trades on Friday

Please post your backtests on different pairs so we can see if the results are as bad as on EU.
Attached File
File Type: ex4 Cobra_EA.ex4   26 KB | 300 downloads
  • Post #34
  • Quote
  • Mar 18, 2012 11:48am Mar 18, 2012 11:48am
  •  gbraidotti
  • | Joined Sep 2011 | Status: Member | 22 Posts
Quoting fxtr51
Disliked
Thanks to all who thanked me for the indicator and dashboard.

On first sight the Cobra System looks promising but I know from so many other good looking trading strategies which went into the recycle bin
after an EA was coded and backtests were run.

The same seems to be the case here.
I coded the Cobra_EA and here is a backtest on EURUSD H1 for 2011
on Alpari broker.
http://i.imgur.com/xW0vT.jpg

The EA has everything which is in the manual.
1. ADX Filter
2. MA-bands Filter
3. Exit on closed candle on other side of blue bands
4....
Ignored
FXtr51, thank you again! You`ve been going a long way in order to easy things to run cobra system to all of us!
But now, may I share a few things that I`ve been realizing about this system and may be they`ll be good for the EA.

1) ADX >= 22 on the 1st signal candle (the one which opens in the MA buffer and closes out out of it) and ADX on 2nd signal candle > ADX on 1st signal candle. (was I clear here? if not, please let me know!)

2) Getting out of the trade: I like to do the following to get out of most of my trades:
TP1 = size of that`s trade SL
TP2 = TP1 + size of that`s trade SL
TP3 = TP2 + size of that`s trade SL
etc...
What I do is: When price hits TP1, I change my SL to BE.
when price hits TP2, I change my SL to TP1
when price hits TP3, I change my SL to TP2
and so on, until I get stoped.
It`s a regular way of tralling I guess, just a little differente from the trailling MT4 already offers us.
Also, some of my strategies involve closing HALF of the trade when I hit TP1.

I didn`t try this methods yet on Cobra System, but the may help.
  • Post #35
  • Quote
  • Mar 18, 2012 11:58am Mar 18, 2012 11:58am
  •  Kendal
  • | Joined Dec 2006 | Status: Member | 44 Posts
Quoting fxtr51
Disliked
Thanks to all who thanked me for the indicator and dashboard.

The same seems to be the case here.
Ignored
Confirming my manual backtests and also explaining why the original creator never created the EA and eventually shut down the site. Thanks.
  • Post #36
  • Quote
  • Mar 19, 2012 3:36am Mar 19, 2012 3:36am
  •  Noosaville
  • | Joined Dec 2011 | Status: Member | 33 Posts
Dear fxtr51, Great work your doing with your EA despite disappointing results.
Lots of valueable tools being volunteed by members also. If the EA isn't succeeding, how are the manual trades performing.
  • Post #37
  • Quote
  • Mar 26, 2012 8:49pm Mar 26, 2012 8:49pm
  •  rotunda
  • | Joined Jul 2007 | Status: Member | 112 Posts
I have been trading the Cobra System on the M5 chart for about a week with very good results. I have been entering on the first close above the 12 ema channel. Could someone adapt the indicator to take the first break and close of the 12ema channel? Thanks in advance.
  • Post #38
  • Quote
  • Mar 27, 2012 4:19am Mar 27, 2012 4:19am
  •  rotunda
  • | Joined Jul 2007 | Status: Member | 112 Posts
This is the entry I would request the indicator signal.
Attached Image (click to enlarge)
Click to Enlarge

Name: au 32712.gif
Size: 57 KB
  • Post #39
  • Quote
  • Mar 27, 2012 5:14am Mar 27, 2012 5:14am
  •  fxtr51
  • Joined Jan 2010 | Status: Member | 1,163 Posts
Quoting rotunda
Disliked
This is the entry I would request the indicator signal.
Ignored
rotunda, should the indicator still check the orange bands or
"forget" about them and only alert when a bar closes above or below the outer band of 12 MA ?
  • Post #40
  • Quote
  • Mar 27, 2012 7:28am Mar 27, 2012 7:28am
  •  rotunda
  • | Joined Jul 2007 | Status: Member | 112 Posts
Thanks for reply. All parameters agreement, first break and close past the 72 and 12 channels. Thanks
Attached Image (click to enlarge)
Click to Enlarge

Name: gj 32712.gif
Size: 66 KB
  • Platform Tech
  • /
  • Need Big Help on Indicator Coding
  • Reply to Thread
    • 1 Page 23 4
    • 1 Page 23 4
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 / ©2021