Experts: jMasterRSX v1 by jirimac - page 3

 

Hello Pipster .-

To publish any file on this forum you can:

- Open the file .set with windows notepad.
- Select all and copy.
- In this forum thread, click Reply and paste the code.
- Those who want to use the code we have to create a single file .set with notepad
and containing the code you have pasted.
- This also serves to post a complete EA, although it is very long, but is the only
alternative in this forum.

Hello jirimac .-

I like to see a good configuration for GBPUSD of jMasterRSXv1C.mq4,
with a view to optimize it to 1 or 5 minutes.

Here I put the results for EURUSD 1 min

file .set :

MAGICMA=72609
MAGICMA,F=0
MAGICMA,1=72609
MAGICMA,2=0
MAGICMA,3=0
Lots=0.10000000
Lots,F=0
Lots,1=0.10000000
Lots,2=0.00000000
Lots,3=0.00000000
DecreaseFactor=20.00000000
DecreaseFactor,F=0
DecreaseFactor,1=0.00000000
DecreaseFactor,2=0.00000000
DecreaseFactor,3=0.00000000
UseMoneyManagement=1
MaximumRisk=0.01000000
MaximumRisk,F=0
MaximumRisk,1=0.01000000
MaximumRisk,2=0.00000000
MaximumRisk,3=0.00000000
Max_Lot_Size=50.00000000
Max_Lot_Size,F=0
Max_Lot_Size,1=50.00000000
Max_Lot_Size,2=0.00000000
Max_Lot_Size,3=0.00000000
Max_Num_Lots=500.00000000
Max_Num_Lots,F=0
Max_Num_Lots,1=500.00000000
Max_Num_Lots,2=0.00000000
Max_Num_Lots,3=0.00000000
LongPer=30
LongPer,F=0
LongPer,1=30
LongPer,2=0
LongPer,3=0
ShortPer=5
ShortPer,F=0
ShortPer,1=5
ShortPer,2=0
ShortPer,3=0
LongRSX=14
LongRSX,F=0
LongRSX,1=14
LongRSX,2=0
LongRSX,3=0
ShortRSX=14
ShortRSX,F=0
ShortRSX,1=14
ShortRSX,2=0
ShortRSX,3=0
LongParBuy=50
LongParBuy,F=0
LongParBuy,1=50
LongParBuy,2=0
LongParBuy,3=0
ShortParBuy=40
ShortParBuy,F=0
ShortParBuy,1=25
ShortParBuy,2=0
ShortParBuy,3=0
LongParSell=50
LongParSell,F=0
LongParSell,1=50
LongParSell,2=0
LongParSell,3=0
ShortParSell=80
ShortParSell,F=0
ShortParSell,1=75
ShortParSell,2=0
ShortParSell,3=0
LongTrendSpread=3
LongTrendSpread,F=0
LongTrendSpread,1=3
LongTrendSpread,2=0
LongTrendSpread,3=0
s2=__________________Take Profit Parameters
s2a=..................Mode 0 = Profit by Pips Mode
s2b=..................Mode 1 = Profit by Highest/Lowest of Range of Bars
s2c=..................Mode 2 = Profit by High/Low of Bar x
UseTakeProfit=0
TakeProfitMode=0
TakeProfitMode,F=0
TakeProfitMode,1=1
TakeProfitMode,2=0
TakeProfitMode,3=0
s3=__________________Stop Loss Parameters
s31=..................Mode 0 = Stop by Pips Mode
s32=..................Mode 1 = Stop by Highest/Lowest of Range of Bars
s33=..................Mode 2 = Stop by High/Low of Bar x
UseStopLoss=1
StopMode=0
StopMode,F=0
StopMode,1=1
StopMode,2=0
StopMode,3=0
s4=__________________Trailing Stop Parameters
s41=..................Mode 0 = Trail by Pips Mode
s42=..................Mode 1 = Trail by Highest/Lowest of Range of Bars
s43=..................Mode 2 = Trail by High/Low of Bar x
UseTrail=1
TrailMode=1
TrailMode,F=0
TrailMode,1=1
TrailMode,2=0
TrailMode,3=0
s5=__________________Buy Order Parameters
TakeProfitPip_Buy=150
TakeProfitPip_Buy,F=0
TakeProfitPip_Buy,1=150
TakeProfitPip_Buy,2=0
TakeProfitPip_Buy,3=0
TakeProfitBar_Buy=7
TakeProfitBar_Buy,F=0
TakeProfitBar_Buy,1=7
TakeProfitBar_Buy,2=0
TakeProfitBar_Buy,3=0
StopPip_Buy=150
StopPip_Buy,F=0
StopPip_Buy,1=150
StopPip_Buy,2=0
StopPip_Buy,3=0
StopBar_Buy=7
StopBar_Buy,F=0
StopBar_Buy,1=7
StopBar_Buy,2=0
StopBar_Buy,3=0
TrailPip_Buy=75
TrailPip_Buy,F=0
TrailPip_Buy,1=75
TrailPip_Buy,2=0
TrailPip_Buy,3=0
TrailBar_Buy=7
TrailBar_Buy,F=0
TrailBar_Buy,1=7
TrailBar_Buy,2=0
TrailBar_Buy,3=0
TrailMin_Buy=75
TrailMin_Buy,F=0
TrailMin_Buy,1=75
TrailMin_Buy,2=0
TrailMin_Buy,3=0
s6=__________________Sell Order Parameters
TakeProfitPip_Sell=150
TakeProfitPip_Sell,F=0
TakeProfitPip_Sell,1=150
TakeProfitPip_Sell,2=0
TakeProfitPip_Sell,3=0
TakeProfitBar_Sell=7
TakeProfitBar_Sell,F=0
TakeProfitBar_Sell,1=7
TakeProfitBar_Sell,2=0
TakeProfitBar_Sell,3=0
StopPip_Sell=150
StopPip_Sell,F=0
StopPip_Sell,1=150
StopPip_Sell,2=0
StopPip_Sell,3=0
StopBar_Sell=7
StopBar_Sell,F=0
StopBar_Sell,1=7
StopBar_Sell,2=0
StopBar_Sell,3=0
TrailPip_Sell=75
TrailPip_Sell,F=0
TrailPip_Sell,1=75
TrailPip_Sell,2=0
TrailPip_Sell,3=0
TrailBar_Sell=7
TrailBar_Sell,F=0
TrailBar_Sell,1=7
TrailBar_Sell,2=0
TrailBar_Sell,3=0
TrailMin_Sell=75
TrailMin_Sell,F=0
TrailMin_Sell,1=75
TrailMin_Sell,2=0
TrailMin_Sell,3=0


1/1/09 - today

But only 25% quality.

 
jirimac:

Id love to send you the file, but dont have it.. But why do you need it anyway?

Try these basic settings on a 1HR GBPUSD chart. (15 min chart works, too) It will give a basic idea how this EA works. It can definitely be fine tuned from here... these are just a starting point to go from.

LongPer = 30

ShortPer = 5

LongRSX = 23

Short RSX = 17

LongParBuy = 50

ShortParBuy = 45

LongParSell = 50

ShortParSell = 65

Turn off all stop/trail/takeprofit features and set money mangement to .01 (1%).


I started with 1000USD for these results. Time Period of test: 02-01-09 through 08-02-09 (6mos).


GBPUSD 1HR Chart with above settings and $1000USD start!

 

Version jMasterRSXv1C & v1D users:

If you use a 4 digit broker you will have poor results with the EA because of a coding error.

Change the line in the start() function that reads

if(Digits <= 4) to if(Digits < 4)

This should correct the functionality for 4 digit brokers.

Thanks lordorly for pointing out the error!


Regards,

pipster;-)

 

thanks,

your stratage is very nice,i use your frame and add my own trade condition,the result get better,it never got to zero,your account manager do it,thank you,pipster .

 

Hi jirimac,

I've been busy battling the HeurEngine.Packed.Themida.RGa infection which has been propagating through my system like crazy. I picked it up from an EA that I downloaded recently from the MQL4 website. It is in your jMasterRSX AE including files that are named RSX*. I have a number of different security programs: The one that initially found it and says that it has successfully cleaned it without having to delete the programs is called Spyware Doctor from PC tools. I am currently running all of my scanners on everything on my computer for it. As I have ~ 2 TB it will take some time. Once it finishes and if none of my scanners has to delete it and if it is still viable, I would be happy to upload them back to you cleaned if you like.

Thanks for sharing your code with us.

…………………………………………..………………………(8 >) Prosperous Trading (< 8)

DougRH4x

 
DougRH4x:

You are kidding, right? Im sorry but this is MetaTrader Programming, not a spyware or virus section :)

I hope the Spyware Doctor is not one of those software what finds viruses on you system and the only way how it can remove it is to buy a full license for it, lol.

I once came across one Spyware Doctor which found six viruses on my system in C:\Windows\System32 but the only problem is I was on MAC :D

 
jirimac:
DougRH4x:

You are kidding, right? Im sorry but this is MetaTrader Programming, not a spyware or virus section :)

I hope the Spyware Doctor is not one of those software what finds viruses on you system and the only way how it can remove it is to buy a full license for it, lol.

I once came across one Spyware Doctor which found six viruses on my system in C:\Windows\System32 but the only problem is I was on MAC :D

Hi jirimac,

Unfortunately I am not kidding. I have used this security program for MANY years now and it is fully licensed and has proven to be very reliable, effective and accurate. The infection in your code propagated itself and infected more than 50 other programs on my computer in just a few hours, including ever instance of MetaLang.Exe of which I have a few of. The fact that it started propagating itself onto other files immediately and would of gone on to infect many more if I did not take measures to destroy it before it ‘destroyed’ and wrecked who knows what havoc on my computer rules this out as being a ‘false positive’. Given its behavior it confirms that THIS INFECTION IS IN YOUR EA!

I am well aware that this is not a 'spyware or virus' forum. But as the infection that I gave you the info about is in a number of programs in your code, which makes it VERY relevant HERE. I would think and hope that you don't want to be spreading viruses with your EA. I am not saying that you planted it or infected it yourself, so don't take this as an attack and get all hot and bothered about this, as it most definitely is not directed at you personally. Who know who or how it got infected? Not me, but I know for certain that it was in a couple of your files in this EA that I downloaded from right here.

Having found this out, I and I’m quite sure that anyone else that is interested in your EA and downloads it will want you to respond and act responsibly and take whatever measures necessary to remove and destroy it before it infects many other computers, especially ones that don’t have security programs that will pick up on it. Which is what I am doing by letting you know that you have this infection to take care of the problem and not to summarily dismiss it and allow it to continue to spread and infect others computers including your own!

FYI: I have used computers for over 30 years, so I am hardly an overreacting newbie by my discovery of this infection and then panicking and scrambling to spread a false alarm. I use several different security programs and scanners just because none of them can pick up on all of the different types of infections. The other 2, including McAfee’s 3 user ‘total protection suite’, that I scanned my computer with didn’t find them either.

Your code HAS this infection!

DougRH4x

 
DougRH4x:

Im sorry buddy, I can't really listen this. Its the same like saying the comment you posted has virus in it! Don't read it or it will infect your computer.

Look, here is the code, show me what part of the code is the infection, alright? Im not gonna spend anymore time to even reply to you. I feel sorry for your trouble but the code is MQL4 code for trading and as you can see it the code, there is nothing else so please clean your computer from any viruses and if you wish, you are more then welcome to use this code again.

It takes a long time to develop something and then listen to this really hurts, ok?

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Magenta
#property indicator_level1 70
#property indicator_level2 30
#property indicator_level3 50
#property indicator_maximum 100
#property indicator_minimum 0
//---- input parameters
extern int       Len=14;
//---- buffers
double rsx[];
   
double f88, f90;
double f0, v4, v8, vC, v10, v14, v18, v20;
double f8, f10, f18, f20, f28, f30, f38, f48, v1C;
double f50, f58, f60, f68, f70, f78, f80, f40;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,rsx);
   IndicatorShortName("rsx("+Len+")");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int counted_bars=IndicatorCounted(),limit,shift;
   
   if (counted_bars<0) return(-1);
   if (counted_bars>0) counted_bars--;
   limit=Bars-Len-1;
   if(counted_bars>Len) limit=Bars-counted_bars-1;
   if (limit<2) limit=100;
   
   for (shift=limit;shift>=0;shift--)   {
      if (f90 == 0.0) {
         f90 = 1.0;
         f0 = 0.0;
         if (Len-1 >= 5) f88 = Len-1.0; else f88 = 5.0;
         f8 = 100.0*(High[shift]+Low[shift]); 
         f18 = 3.0 / (Len + 2.0);
         f20 = 1.0 - f18;
      } else {
         if (f88 <= f90) 
            f90 = f88 + 1; 
         else 
            f90 = f90 + 1;
         f10 = f8;
         f8  = 100*(High[shift]+Low[shift]); 
         v8  = f8 - f10;
         f28 = f20 * f28 + f18 * v8;
         f30 = f18 * f28 + f20 * f30;
         vC  = f28 * 1.5 - f30 * 0.5;
         f38 = f20 * f38 + f18 * vC;
         f40 = f18 * f38 + f20 * f40;
         v10 = f38 * 1.5 - f40 * 0.5;
         f48 = f20 * f48 + f18 * v10;
         f50 = f18 * f48 + f20 * f50;
         v14 = f48 * 1.5 - f50 * 0.5;
         f58 = f20 * f58 + f18 * MathAbs(v8);
         f60 = f18 * f58 + f20 * f60;
         v18 = f58 * 1.5 - f60 * 0.5;
         f68 = f20 * f68 + f18 * v18;
         f70 = f18 * f68 + f20 * f70;
         v1C = f68 * 1.5 - f70 * 0.5;
         f78 = f20 * f78 + f18 * v1C;
         f80 = f18 * f78 + f20 * f80;
         v20 = f78 * 1.5 - f80 * 0.5;
         if ((f88 >= f90) && (f8 != f10)) f0 = 1.0;
         if ((f88 == f90) && (f0 == 0.0)) f90 = 0.0;
      }
    
      if ((f88 < f90) && (v20 > 0.0000000001)) {
         v4 = (v14 / v20 + 1.0) * 50.0;
         if (v4 > 100.0) v4 = 100.0;
         if (v4 < 0.0) v4 = 0.0;
      } else {
         v4 = 50.0;
      }
 
      rsx[shift]=v4;
   }
   return(0);
  }
 
jirimac:
DougRH4x:

You are kidding, right? Im sorry but this is MetaTrader Programming, not a spyware or virus section :)

I hope the Spyware Doctor is not one of those software what finds viruses on you system and the only way how it can remove it is to buy a full license for it, lol.

I once came across one Spyware Doctor which found six viruses on my system in C:\Windows\System32 but the only problem is I was on MAC :D

Hi JiriMac,

I am happy to say that it appears that you are correct and that it turned out to be a 'False Positive' after all. I certainly hope that is the case. In no way was it intended as a personal attack on you, I don't even know you, so how would it be? I was just responding and acting responsibly to what very strongly appeared to be a viral infection. We all know that they are rampant and everywhere. I know I have certainly had more than my share of them in spite of the MANY different security measures that I utilize. If it turned out to be correct and that your code had been infected, you would want to know about it wouldn’t you? I will be contacting PC Tools about this and passing along the information to them to deal with it and hopefully they will confirm that it was a false positive and correct the problem.

I look forward to trying out your EA and see what you have been up to and what your approach is.

My sincere apologies for any grief that I caused you! As I said, that most certainly was NOT my intention in any way, shape or form.

Regards,

DougRH4X

PS: Please delete my initial posting in you thread where I let you know about it and likewise my response to your response.

Thanks

 

Ok, no problem. Apology accepted ;) Im happy its all sorted. Of course if there would be a virus i would like to know. But since I and other members like Pipster wrote the code, we know what we programmed :)

Good luck with trading :)

Reason: