Received: from n20a.bullet.scd.yahoo.com ([66.94.237.49])
          by sccrmxc12.comcast.net (sccrmxc12) with SMTP
          id <20070712181908s1200f0r5pe>; Thu, 12 Jul 2007 18:19:08 +0000
X-Originating-IP: [66.94.237.49]
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lima; d=yahoogroups.com;
	b=jlJSmx8LG+kZjdivsr3rT/w8begRUgHEZCfZy1Vh9ZuxilhZJz6DeLqV0MdchP3IAnM4mBTwzjvZaGeZtOTxzXDJ64Kb3EPepHCAZkL01lK/Yr6+cAXv+LjNI6BxhiJf;
Received: from [209.73.164.86] by n20.bullet.scd.yahoo.com with NNFMP; 12 Jul 2007 18:19:06 -0000
Received: from [66.218.66.156] by t8.bullet.scd.yahoo.com with NNFMP; 12 Jul 2007 18:19:06 -0000
X-Yahoo-Newman-Id: 12111071-m6292
X-Sender: dr_richard_gaines@yahoo.com
X-Apparently-To: MetaTrader_Experts_and_Indicators@yahoogroups.com
Received: (qmail 68706 invoked from network); 12 Jul 2007 18:19:05 -0000
Received: from unknown (66.218.66.71)
  by m52.grp.scd.yahoo.com with QMQP; 12 Jul 2007 18:19:05 -0000
Received: from unknown (HELO web37005.mail.mud.yahoo.com) (209.191.85.90)
  by mta13.grp.scd.yahoo.com with SMTP; 12 Jul 2007 18:19:04 -0000
Received: (qmail 97282 invoked by uid 60001); 12 Jul 2007 18:16:50 -0000
X-YMail-OSG: H3BTkXsVM1kTNnqyTpN9x_VYeO0a7HPWmJekSpqP2PBYYB566Y1oYm7.jqy2X7NYZEorT33wgpJUN.UzSR3ht.wLsXWc6dEt8.XUwMosa8.LpdC.jLA-
Received: from [68.226.6.111] by web37005.mail.mud.yahoo.com via HTTP; Thu, 12 Jul 2007 11:16:50 PDT
To: MetaTrader_Experts_and_Indicators@yahoogroups.com
In-Reply-To: <680810.67082.qm@web31310.mail.mud.yahoo.com>
Message-ID: <195416.97248.qm@web37005.mail.mud.yahoo.com>
X-Originating-IP: 209.191.85.90
X-eGroups-Msg-Info: 1:0:0:0
From: richard gaines <dr_richard_gaines@yahoo.com>
X-Yahoo-Profile: dr_richard_gaines
Sender: MetaTrader_Experts_and_Indicators@yahoogroups.com
MIME-Version: 1.0
Mailing-List: list MetaTrader_Experts_and_Indicators@yahoogroups.com; contact MetaTrader_Experts_and_Indicators-owner@yahoogroups.com
Delivered-To: mailing list MetaTrader_Experts_and_Indicators@yahoogroups.com
List-Id: <MetaTrader_Experts_and_Indicators.yahoogroups.com>
Precedence: bulk
List-Unsubscribe: <mailto:MetaTrader_Experts_and_Indicators-unsubscribe@yahoogroups.com>
Date: Thu, 12 Jul 2007 11:16:50 -0700 (PDT)
Subject: Re: [MT_E and I] SnakeForce EA and Indicator
X-Yahoo-Newman-Property: groups-email-ff
Reply-To: MetaTrader_Experts_and_Indicators@yahoogroups.com
Content-Type: multipart/mixed;
 boundary="0-1552743943-1184264210=:97248"

--0-1552743943-1184264210=:97248
Content-Type: multipart/alternative;
 boundary="0-32374083-1184264210=:97248"

--0-32374083-1184264210=:97248
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hi DAN the man,
   
  I have attached for you the information requested, sir.
   
  Thanks for helping me / us from the start.
  Doc
   
  

dan flores <forextrend@yahoo.com> wrote: 
            can someone post the snakeforce indicator and EA.
   
  Thanks

Tiger <america1931@cox.net> wrote:
        Since I tested the snakeforce EA with difficulty ... I thought I would pass this along ... 
   
  I have been watching the 'snakeforce' indicator very carefully for the past week ... 
   
  I have made 6 trades in a row (no losers) for over 125 pips ... using it in conjunction my 'method' as a verifier ... 
   
  so far I haven't noticed any repainting in the bars that I'm interested in ... that's only the last 5 or 6 ... 
   
  I did add the MACD lines (set at 5,13,2) in the same window ... 
   
  on top of the SF and that gives me an even better clue as to what's going on ... call it 'kentucky' windage' ... 
   
  As long as the two of them agree ..,. so far it's been 100% ... 
   
  I'll keep everybody posted on what's going on ... good hunting ... Jim
   
   
    ----- Original Message ----- 
  From: richard gaines 
  To: MetaTrader_Experts_and_Indicators@yahoogroups.com 
  Sent: Thursday, July 12, 2007 10:21 AM
  Subject: Re: [MT_E and I] SnakeForce EA
  

      Hi guys
   
  It will not work correctly because it repaints as Gordon pointed out then Matt and Bob confirmed out. The one you guys have was not for running it was for teaching traders how to use templates to strategy test indicators experts then systems in that order. Always remember that indicators behave differently than want we may see. A indicator that may look good visually not trade well mechanically. Visually repainting may be good. Mechanically repainting is bad. Another point the one that I posted has another bug in that the shift is not correct. Development of experts takes patience and practice. This one is truely still under construction and no more than a test.
   
  1. will it fire
  2. are the indicators stable and compatible
   
  There is more and others here are much more qualified than I, but I am trying to share the science behind all of this for newbies, traders, and would be programmers and programmers. Excellent money making manual systems may not necessarily produce consistantly profitable mechanical algorithms
   
  Guppytraders.com - Trading Rules Sample Chapter 
  Mechanical trading systems based on complex mathematical rules and advanced algorithms succeed for a short time and then they lose touch with an ever-evolving market. ...
  www.guppytraders.com/gup151.htm - 28k - Cached 
   
  The correct science first will bring the money.
  Doc

Tiger <america1931@cox.net> wrote:
        Better watch it carefully ... 
   
    ----- Original Message ----- 
  From: Madhusoodan P. Shanbhag 
  To: MetaTrader_Experts_and_Indicators@yahoogroups.com 
  Sent: Wednesday, July 11, 2007 10:52 PM
  Subject: Re: [MT_E and I] SnakeForce EA
  

    I am running this EA on 15 minute time frame on GBPJPY and EURJPY and it 
has opened 2 short orders as of now.

setting.

lots 0.1
stop loss 15
profit target 20
trailing stop 10

Thanks and regards


  





http://360.yahoo.com/dr_richard_gaines

DISCLAIMER - Dr Richard Gaines is not a registered Investment Adviser or a 
Broker/Dealer. The trading of securities/currencies may not be suitable for all 
potential users of the Service. You should be aware of the risks inherent 
in the stock/foreign exchange market. Past performance does not guarantee or imply 
future success. You cannot assume that profits or gains will be realized. 
The purchase of securities/currencies discussed may result in the loss of some or 
all of any investment made. We recommend that you consult a stock/foreign exchange broker/ 
or financial advisor before buying or selling securities/currencies, or making any 
investment decisions. You assume the entire cost and risk of any 
investing and/or trading you choose to undertake. 
We do not endorse or recommend any securities/currencies mentioned in this 
mailing, but we may take compensation for sending this message.     
---------------------------------
  Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.   



  





                Go confidently in the direction of your dreams. 
Live the life you've imagined. 
  The greatest help i can give you is to show you how to help yourself.
                                                                                                  ..W.D Gann 
  Many are called but few are chosen. Learn from the chosen if you are not one.







    
---------------------------------
  Building a website is a piece of cake. 
Yahoo! Small Business gives you all the tools to get online.   

         




http://360.yahoo.com/dr_richard_gaines

DISCLAIMER - Dr Richard Gaines is not a registered Investment Adviser or a 
Broker/Dealer. The trading of securities/currencies may not be suitable for all 
potential users of the Service. You should be aware of the risks inherent 
in the stock/foreign exchange market. Past performance does not guarantee or imply 
future success. You cannot assume that profits or gains will be realized. 
The purchase of securities/currencies discussed may result in the loss of some or 
all of any investment made. We recommend that you consult a stock/foreign exchange broker/ 
or financial advisor before buying or selling securities/currencies, or making any 
investment decisions. You assume the entire cost and risk of any 
investing and/or trading you choose to undertake. 
 We do not endorse or recommend any securities/currencies mentioned in this 
mailing, but we may take compensation for sending this message.
       
---------------------------------
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.
--0-32374083-1184264210=:97248
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
</head>

<!-- Network content -->


<body style="background-color: #ffffff;">



    <div id="ygrp-text">
            <p><div>Hi DAN the man,</div>  <div>&nbsp;</div>  <div>I have attached for you the information requested, sir.</div>  <div>&nbsp;</div>  <div>Thanks for helping me / us from the start.</div>  <div>Doc</div>  <div>&nbsp;</div>  <div><BR><BR><B><I>dan flores &lt;forextrend@yahoo.<wbr>com&gt;</I></B> wrote: </div>  <BLOCKQUOTE class="replbq" style="BORDER-LEFT: #1010ff 2px solid;"><!-- Network content -->  <DIV id="ygrp-text">  <DIV>  <DIV>can someone post the snakeforce indicator and EA.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks<BR><BR><B><I>Tiger &lt;america1931@<WBR>cox.net&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class="replbq" style="BORDER-LEFT: #1010ff 2px solid;"><!-- Network content
 -->  <DIV id="ygrp-text">  <DIV>  <DIV><STRONG><FONT color="#000080">Since I tested the snakeforce EA with difficulty ... I thought I would pass this along ... </FONT></STRONG></DIV>  <DIV><STRONG><FONT color="#000080"></FONT></STRONG>&nbsp;</DIV>  <DIV><STRONG><FONT color="#000080">I have been watching the 'snakeforce' <U>indicator </U>very carefully for the past week ... </FONT></STRONG></DIV>  <DIV><STRONG><FONT color="#000080"></FONT></STRONG>&nbsp;</DIV>  <DIV><STRONG><FONT color="#000080">I have made 6 trades in a row (no losers) for over 125 pips ... using it in conjunction my 'method' as a verifier ... </FONT></STRONG></DIV>  <DIV><STRONG><FONT color="#000080"></FONT></STRONG>&nbsp;</DIV>  <DIV><STRONG><FONT color="#000080">so far I haven't noticed any repainting in the bars that I'm interested in ... that's only the last 5 or 6 ... </FONT></STRONG></DIV>  <DIV><STRONG><FONT color="#000080"></FONT></STRONG>&nbsp;</DIV>  <DIV><STRONG><FONT color="#000080">I did add the MACD lines (set
 at 5,13,2)&nbsp;in the same window ... </FONT></STRONG></DIV>  <DIV>&nbsp;</DIV>  <DIV><STRONG><FONT color="#000080">on top of the SF and that gives me an even better clue as to what's going on ... call it 'kentucky' windage' ... </FONT></STRONG></DIV>  <DIV><STRONG><FONT color="#000080"></FONT></STRONG>&nbsp;</DIV>  <DIV><STRONG><FONT color="#000080">As long as the two of them agree ..,. so far it's been 100% ... </FONT></STRONG></DIV>  <DIV><STRONG><FONT color="#000080"></FONT></STRONG>&nbsp;</DIV>  <DIV><STRONG><FONT color="#000080">I'll keep everybody posted on what's going on ... good hunting ... Jim</FONT></STRONG></DIV>  <DIV><STRONG><FONT color="#000080"></FONT></STRONG>&nbsp;</DIV>  <DIV><STRONG><FONT color="#000080"></FONT></STRONG>&nbsp;</DIV>  <BLOCKQUOTE style="BORDER-LEFT: #000080 2px solid;">  <DIV style="FONT: 10pt arial;">----- Original Message ----- </DIV>  <DIV style="BACKGROUND: #e4e4e4;FONT: 10pt arial;"><B>From:</B> <A title="dr_richard_gaines@yahoo.com" href="mailto:dr_richard_gaines@yahoo.com">richard gaines</A> </DIV>  <DIV style="FONT: 10pt arial;"><B>To:</B> <A title="MetaTrader_Experts_and_Indicators@yahoogroups.com" href="mailto:MetaTrader_Experts_and_Indicators@yahoogroups.com">MetaTrader_Experts_<WBR>and_Indicators@<WBR>yahoogroups.<WBR>com</A> </DIV>  <DIV style="FONT: 10pt arial;"><B>Sent:</B> Thursday, July 12, 2007 10:21 AM</DIV>  <DIV style="FONT: 10pt arial;"><B>Subject:</B> Re: [MT_E and I] SnakeForce EA</DIV>  <DIV><BR></DIV>  <DIV id="ygrp-text">  <DIV>  <DIV>Hi guys</DIV>  <DIV>&nbsp;</DIV>  <DIV>It will not work correctly because it repaints as Gordon pointed out&nbsp;then Matt and&nbsp;Bob confirmed&nbsp;out. The one you guys have was not for running it was for teaching traders how to use templates to strategy test indicators experts then systems in that order. Always remember that indicators behave differently than want we may see. A indicator that may look good visually not trade well mechanically. Visually
 repainting may be good. Mechanically repainting is bad. Another point the one that I posted has another bug in that the shift is not correct. Development of experts takes patience and practice. This one is truely still under construction and no more than a test.</DIV>  <DIV>&nbsp;</DIV>  <DIV>1. will it fire</DIV>  <DIV>2. are the indicators stable and compatible</DIV>  <DIV>&nbsp;</DIV>  <DIV>There is more and others here are much more qualified than I, but I am trying to share the science behind all of this for newbies, traders, and would be programmers and programmers. Excellent money making manual systems may not necessarily&nbsp;produce consistantly profitable mechanical algorithms</DIV>  <DIV><EM></EM>&nbsp;</DIV><EM>  <DIV><A class="yschttl" href="http://rds.yahoo.com/_ylt=A0geu_N7RZZGyv0AkMRXNyoA;_ylu=X3oDMTE5MzcyYXU5BHNlYwNzcgRwb3MDOQRjb2xvA2FjMgR2dGlkA0RGUjVfMTA1BGwDV1Mx/SIG=11qfkrl8o/EXP=1184339707/**http%3a//www.guppytraders.com/gup151.htm"><FONT color="#0000de" size="3">Guppytraders.<WBR>com - <B>Trading</B> Rules Sample Chapter</FONT></A> </DIV>  <DIV class="yschabstr"><B>Mechanical</B> <B>trading</B> systems based on complex mathematical rules and advanced <B>algorithms</B> succeed for a short time and then they lose touch with an ever-evolving market. ...</DIV>  <DIV><SPAN class="yschurl"><FONT color="#008000">www.<B>guppytraders.<WBR>com</B>/gup151.htm</FONT></SPAN> - <EM><FONT color="#8284cc">28k</FONT></EM> - <A href="http://rds.yahoo.com/_ylt=A0geu_N7RZZGyv0AkcRXNyoA/SIG=17ne28nof/EXP=1184339707/**http%3a//216.109.125.130/search/cache%3fei=UTF-8%26p=mechanical%2btrading%2balgorithms%26y=Search%26fr=ace2%26u=www.guppytraders.com/gup151.htm%26w=mechanical%2btrading%2balgorithms%2balgorithm%26d=NxYC_ernO5qq%26icp=1%26.intl=us"><FONT color="#8284cc">Cached</FONT></A> </EM></DIV>  <DIV><EM></EM>&nbsp;</DIV>  <DIV><EM>The correct science first will bring the money.</EM></DIV>  <DIV>Doc<BR><BR><B><I>Tiger
 &lt;america1931@<WBR>cox.net&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class="replbq" style="BORDER-LEFT: #1010ff 2px solid;"><!-- Network content -->  <DIV id="ygrp-text">  <DIV>  <DIV><STRONG><FONT color="#000080">Better watch it carefully ... </FONT></STRONG></DIV>  <DIV>&nbsp;</DIV>  <BLOCKQUOTE style="BORDER-LEFT: #000080 2px solid;">  <DIV style="FONT: 10pt arial;">----- Original Message ----- </DIV>  <DIV style="BACKGROUND: #e4e4e4;FONT: 10pt arial;"><B>From:</B> <A title="ymadhusoodan@gmail.com" href="mailto:ymadhusoodan@gmail.com">Madhusoodan P. Shanbhag</A> </DIV>  <DIV style="FONT: 10pt arial;"><B>To:</B> <A title="MetaTrader_Experts_and_Indicators@yahoogroups.com" href="mailto:MetaTrader_Experts_and_Indicators@yahoogroups.com">MetaTrader_Experts_<WBR>and_Indicators@<WBR>yahoogroups.<WBR>com</A> </DIV>  <DIV style="FONT: 10pt arial;"><B>Sent:</B> Wednesday, July 11, 2007 10:52 PM</DIV>  <DIV style="FONT: 10pt arial;"><B>Subject:</B> Re: [MT_E and I] SnakeForce EA</DIV> 
 <DIV><BR></DIV>  <DIV id="ygrp-text">  <DIV>I am running this EA on 15 minute time frame on GBPJPY and EURJPY and it <BR>has opened 2 short orders as of now.<BR><BR>setting.<BR><BR>lots 0.1<BR>stop loss 15<BR>profit target 20<BR>trailing stop 10<BR><BR>Thanks and regards<BR></DIV></DIV><!--End group email --></BLOCKQUOTE>  <DIV></DIV></DIV><!--End group email   --></DIV></BLOCKQUOTE><BR><BR><BR>http://360.yahoo.<WBR>com/dr_richard_<WBR>gaines<BR><BR>DISCLAIMER - Dr Richard Gaines is not a registered Investment Adviser or a <BR>Broker/Dealer. The trading of securities/currenci<WBR>es may not be suitable for all <BR>potential users of the Service. You should be aware of the risks inherent <BR>in the stock/foreign exchange market. Past performance does not guarantee or imply <BR>future success. You cannot assume that profits or gains will be realized. <BR>The purchase of securities/currenci<WBR>es discussed may result in the loss of some or <BR>all of any investment made. We
 recommend that you consult a stock/foreign exchange broker/ <BR>or financial advisor before buying or selling securities/currenci<WBR>es, or making any <BR>investment decisions. You assume the entire cost and risk of any <BR>investing and/or trading you choose to undertake. <BR>We do not endorse or recommend any securities/currenci<WBR>es mentioned in this <BR>mailing, but we may take compensation for sending this message.   <DIV>  <HR SIZE="1">  Looking for a deal? <A href="http://us.rd.yahoo.com/evt=47094/*http://farechase.yahoo.com/;_ylc=X3oDMTFicDJoNDllBF9TAzk3NDA3NTg5BHBvcwMxMwRzZWMDZ3JvdXBzBHNsawNlbWFpbC1uY20-">Find great prices on flights and hotels</A> with Yahoo! FareChase.   <DIV></DIV></DIV><!--End group email --></DIV></DIV></BLOCKQUOTE>  <DIV></DIV></DIV><!--End group email --></DIV></BLOCKQUOTE><BR><BR><BR>  <DIV>  <DIV>  <DIV>  <DIV>  <DIV>  <DIV>  <DIV>  <DIV>Go confidently in the direction of your dreams. <BR>Live the life you've imagined.&nbsp;</DIV> 
 <DIV>The greatest help i can give you is to show you how to help yourself.</DIV>  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;..W.D Gann&nbsp;</DIV>  <DIV>Many are called but few are chosen. Learn from the chosen if you are not one.</DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV>  <DIV>  <HR SIZE="1">  Building a website is a piece of cake. <BR>Yahoo! Small Business gives you <A href="http://us.rd.yahoo.com/evt=48251/*http://smallbusiness.yahoo.com/webhosting/?p=PASSPORTPLUS">all the tools to get online.</A>   <DIV></DIV></DIV><!--End group email --></DIV></DIV></BLOCKQUOTE><BR><BR><BR>http://360.yahoo.<wbr>com/dr_richard_<wbr>gaines<br><br>DISCLAIMER - Dr Richard Gaines is not a registered Investment Adviser or a <br>Broker/Dealer. The trading of securities/currenci<wbr>es may not be suitable for all <br>potential users of the Service. You should be aware of the risks inherent <br>in the stock/foreign exchange market. Past performance does not guarantee or imply <br>future success. You cannot assume that profits or gains will be realized. <br>The purchase of securities/currenci<wbr>es discussed may result in the loss of some or <br>all of any investment made. We recommend that you consult a stock/foreign exchange broker/ <br>or financial advisor before buying or selling securities/currenci<wbr>es, or making any <br>investment decisions. You assume the entire cost and risk of any <br>investing and/or trading you choose to undertake. <br> We do not endorse or
 recommend any securities/currenci<wbr>es mentioned in this <br>mailing, but we may take compensation for sending this message.<p>&#32;
      <hr size="1">Be a better Globetrotter. <a href="http://us.rd.yahoo.com/evt=48254/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545469">Get better travel answers </a>from someone who knows.<br>Yahoo! Answers - Check it out.

</p>
    </div>  

    
</body>

</html><!--End group email -->


--0-32374083-1184264210=:97248--

--0-1552743943-1184264210=:97248
Content-Type: application/octet-stream; name="SnakeForce v1c.mq4"
Content-Transfer-Encoding: base64
Content-Description: 1308559807-SnakeForce v1c.mq4
Content-Disposition: attachment; filename="SnakeForce v1c.mq4"

Ly8rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKw0KLy98IFNuYWtlRm9yY2UgRWEg
djFjICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgfA0KLy98ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfA0KLy98ICAgICAg
ICAgICAgIC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CdXkpICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgfA0KICAgICAgICAgICAgLy8rLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tKw0KDQogICAgICAgICAgICBpZiAoT3JkZXIgPT0gU0lH
TkFMX0NMT1NFQlVZICYmICgoRWFjaFRpY2tNb2RlICYmICFUaWNrQ2hlY2sp
IHx8ICghRWFjaFRpY2tNb2RlICYmIChCYXJzICE9IEJhckNvdW50KSkpKSB7
DQogICAgICAgICAgICAgICBPcmRlckNsb3NlKE9yZGVyVGlja2V0KCksIE9y
ZGVyTG90cygpLCBCaWQsIFNsaXBwYWdlLCBNZWRpdW1TZWFHcmVlbik7DQog
ICAgICAgICAgICAgICBpZiAoU2lnbmFsTWFpbCkgU2VuZE1haWwoIltTaWdu
YWwgQWxlcnRdIiwgIlsiICsgU3ltYm9sKCkgKyAiXSAiICsgRG91YmxlVG9T
dHIoQmlkLCBEaWdpdHMpICsgIiBDbG9zZSBCdXkiKTsNCiAgICAgICAgICAg
ICAgIGlmICghRWFjaFRpY2tNb2RlKSBCYXJDb3VudCA9IEJhcnM7DQogICAg
ICAgICAgICAgICBJc1RyYWRlID0gRmFsc2U7DQogICAgICAgICAgICAgICBj
b250aW51ZTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIC8vVHJhaWxp
bmcgc3RvcA0KICAgICAgICAgICAgaWYoVHJhaWxpbmdTdG9wTW9kZSAmJiBU
cmFpbGluZ1N0b3AgPiAwKSB7ICAgICAgICAgICAgICAgICANCiAgICAgICAg
ICAgICAgIGlmKEJpZCAtIE9yZGVyT3BlblByaWNlKCkgPiBQb2ludCAqIFRy
YWlsaW5nU3RvcCkgew0KICAgICAgICAgICAgICAgICAgaWYoT3JkZXJTdG9w
TG9zcygpIDwgQmlkIC0gUG9pbnQgKiBUcmFpbGluZ1N0b3ApI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hckNvdW50ID0gQmFyczsN
CiAgICAgICAgIHJldHVybigwKTsNCiAgICAgIH0NCiAgIH0NCg0KICAgaWYg
KCFFYWNoVGlja01vZGUpIEJhckNvdW50ID0gQmFyczsNCg0KICAgcmV0dXJu
KDApOw0KfQ0KLy8rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKw==

--0-1552743943-1184264210=:97248
Content-Type: text/plain; name="SnakeForce.txt"
Content-Description: 704536838-SnakeForce.txt
Content-Disposition: inline; filename="SnakeForce.txt"

//+------------------------------------------------------------------+
//|                                               SnakeInBorders.mq4 |
//|                                      "ÈÍÄÈÊÀÒÎÐÛ ÄËß ÑÀÌÎÎÁÌÀÍÀ" |
//|                           Bookkeeper, 2006, yuzefovich@gmail.com |
//+------------------------------------------------------------------+
#property copyright ""
#property link      ""
//+------------------------------------------------------------------+
#property  indicator_separate_window
#property indicator_buffers 4
#property indicator_color1  Lime
#property indicator_color2  Red
#property indicator_color3  Lime
#property indicator_color4  Red
//----
extern int  cPeriod=24; 
//----
double    ForceUp[];
double    ForceDown[];
double    ResistanceUp[];
double    ResistanceDown[];
double    Mart[];
//----
double Snake_Sum, Snake_Weight, Snake_Sum_Minus, Snake_Sum_Plus;
//----
int init()
{
int    draw_begin;
double indperiod,val1,val2;
string CommentStr;
   draw_begin=3*cPeriod;
   IndicatorBuffers(5);
   SetIndexBuffer(0,ForceUp);
   SetIndexBuffer(1,ForceDown);
   SetIndexBuffer(2,ResistanceUp);
   SetIndexBuffer(3,ResistanceDown);
   SetIndexBuffer(4,Mart);
   SetIndexStyle(0,DRAW_HISTOGRAM,EMPTY,2);
   SetIndexStyle(1,DRAW_HISTOGRAM,EMPTY,2);
   SetIndexStyle(2,DRAW_HISTOGRAM);
   SetIndexStyle(3,DRAW_HISTOGRAM);
   SetIndexStyle(4,DRAW_NONE);
   SetIndexLabel(2,NULL);
   SetIndexLabel(3,NULL);
   SetIndexLabel(4,NULL);
   SetIndexDrawBegin(0,draw_begin);
   SetIndexDrawBegin(1,draw_begin);
   SetIndexDrawBegin(2,draw_begin);
   SetIndexDrawBegin(3,draw_begin);
   SetIndexDrawBegin(4,draw_begin);
   indperiod=1.0*cPeriod*Period();
   if(indperiod<60)
   {
      CommentStr=DoubleToStr(indperiod,0);
      CommentStr=" M"+CommentStr+", FORCE UP -DOWN ";
   }
   else
   {
      indperiod=indperiod/60;
      if(indperiod>=24)
      {
         val1=MathAbs(MathRound(indperiod/24)-indperiod/24);
         if(val1<0.01)
         {
            CommentStr=DoubleToStr(indperiod/24,0);
            CommentStr=" D"+CommentStr+", FORCE UP -DOWN ";
         }
          else
         {
            CommentStr=DoubleToStr(indperiod/24,1);
            CommentStr=" D"+CommentStr+", FORCE UP -DOWN ";
         }
      }
      else
      {
         val1=MathAbs(MathRound(indperiod)-indperiod);
         if(val1<0.01)
         {
            CommentStr=DoubleToStr(indperiod,0);
            CommentStr=" H"+CommentStr+", FORCE UP -DOWN ";
         }
          else
         {
            CommentStr=DoubleToStr(indperiod,1);
            CommentStr=" H"+CommentStr+", FORCE UP -DOWN ";
         }
      }
   }
   IndicatorShortName("SnakeInBorders"+CommentStr);
   return(0);
}
//----
void deinit()
{
}
//----
int start()
{
int FirstPos, ExtCountedBars=0,i;
   if(Bars<=50) return(0);
   if(cPeriod<21) return(0);
   ExtCountedBars=IndicatorCounted();
   if (ExtCountedBars<0) return(-1);
   if (ExtCountedBars>0) ExtCountedBars--;
   FirstPos=Bars-ExtCountedBars-1;
   if(FirstPos>Bars-cPeriod-7)
   {
      FirstPos=Bars-cPeriod-7;
      Mart[FirstPos+cPeriod]=SnakeFirstCalc(FirstPos+cPeriod);
      for(i=FirstPos+cPeriod-1;i>FirstPos;i--) SnakeNextCalc(i);
   }
   Snake(FirstPos);
   return(0);
}
//----
void Snake(int Pos)
{
int i;
   if(Pos<6) Pos=6;
   Mart[Pos]=SnakeFirstCalc(Pos);
   Drawing(Pos);
   Pos--;
   while(Pos>=5)
   {
      Mart[Pos]=SnakeNextCalc(Pos);
      Drawing(Pos);
      Pos--;
   }
   while(Pos>0)
   {
      Mart[Pos]=SnakeFirstCalc(Pos);
      Drawing(Pos);
      Pos--;
   }
   if(Pos==0) 
   {
//      Mart[Pos]=iMA(NULL,0,6,0,MODE_LWMA,PRICE_TYPICAL,0);
      Mart[Pos]=iMA(NULL,0,6,0,MODE_LWMA,PRICE_CLOSE,0);
      Drawing(Pos);
   }
   return;
}
//----
double SnakePrice(int Shift)
{
//   return((2*Close[Shift]+High[Shift]+Low[Shift])/4);
   return(Close[Shift]);
}
//----
double SnakeFirstCalc(int Shift)
{
int i, j, w;
   Snake_Sum=0.0;
   if(Shift<5)
   {
      Snake_Weight=0.0;
      i=0;
      w=Shift+5;
      while(w>=Shift)
      {
         i++;
         Snake_Sum=Snake_Sum+i*SnakePrice(w);
         Snake_Weight=Snake_Weight+i;
         w--;
      }
      while(w>=0)
      {
         i--;
         Snake_Sum=Snake_Sum+i*SnakePrice(w);
         Snake_Weight=Snake_Weight+i;
         w--;
      }
   }
   else
   {
      Snake_Sum_Minus=0.0;
      Snake_Sum_Plus=0.0;
      for(j=Shift-5,i=Shift+5,w=1; w<=5; j++,i--,w++)
      {
         Snake_Sum=Snake_Sum+w*(SnakePrice(i)+SnakePrice(j));
         Snake_Sum_Minus=Snake_Sum_Minus+SnakePrice(i);
         Snake_Sum_Plus=Snake_Sum_Plus+SnakePrice(j);
      }
      Snake_Sum=Snake_Sum+6*SnakePrice(Shift);
      Snake_Sum_Minus=Snake_Sum_Minus+SnakePrice(Shift);
      Snake_Weight=36;
   }
   return(Snake_Sum/Snake_Weight);
}
//----
double SnakeNextCalc(int Shift)
{
   Snake_Sum_Plus=Snake_Sum_Plus+SnakePrice(Shift-5);
   Snake_Sum=Snake_Sum-Snake_Sum_Minus+Snake_Sum_Plus;
   Snake_Sum_Minus=Snake_Sum_Minus-SnakePrice(Shift+6)+SnakePrice(Shift);
   Snake_Sum_Plus=Snake_Sum_Plus-SnakePrice(Shift);
   return(Snake_Sum/Snake_Weight);
}
//----
void Drawing(int Shift)
{
double val,Dval,val1,val2,val11,val22,val3;
   val= 5*(Mart[Shift]-Mart[ArrayMinimum(Mart,cPeriod,Shift)])/9;
   Dval=5*(Mart[Shift]-
           Mart[Shift+1]+
           Mart[ArrayMinimum(Mart,cPeriod,Shift+1)]-
           Mart[ArrayMinimum(Mart,cPeriod,Shift)]   )/9;
   if(Dval>0) 
   {
      ForceUp[Shift]=val;
      ResistanceUp[Shift]=0;
   }
   else 
   {
      ForceUp[Shift]=0;
      ResistanceUp[Shift]=val;
   }
   val= 5*(Mart[Shift]-Mart[ArrayMaximum(Mart,cPeriod,Shift)])/9;
   Dval=5*(Mart[Shift]-
           Mart[Shift+1]+
           Mart[ArrayMaximum(Mart,cPeriod,Shift+1)]-
           Mart[ArrayMaximum(Mart,cPeriod,Shift)]   )/9;
   if(Dval<0) 
   {
      ForceDown[Shift]=val;
      ResistanceDown[Shift]=0;
   }
   else 
   {
      ForceDown[Shift]=0;
      ResistanceDown[Shift]=val;
   }
   return;
}

--0-1552743943-1184264210=:97248--

