Forex Factory (https://www.forexfactory.com/forum.php)
-   Commercial Content (https://www.forexfactory.com/forumdisplay.php?f=158)
-   -   Simone Guy's 'Simple and Consistent Fibonacci Method' (https://www.forexfactory.com/showthread.php?t=239947)

SteveHopwood Jun 5, 2010 11:07am | Post# 1

Simone Guy's 'Simple and Consistent Fibonacci Method'
 
44 Attachment(s)
SERIOUS WARNING

  1. Most Forex traders lose all their money.
  2. Using the robots posted here in trading Forex does not guarantee success.
  3. Trading these robots could lead to serious financial loss.
  4. Trading these robots without understanding their underlying trading strategies guarantees traders will lose their money.
  5. A trading robot is a maximum of 90% as good as the manual strategy it trades:

    1. just because the manual strategy is profitable does not guarantee the robot will replicate this success.
    2. if the trading strategy is rubbish, so is the robot.

__________________________________________________________________________________________

Welcome to Simone. Simone is the robot that trades Simone Guy's 'Simple and Consistent Fibonacci Method'.


To understand how this robot works, you need to have traded the system manually first. Visit Simone's 'Simple and Consistent Fibbing Method' thread at http://www.forexfactory.com/showthread.php?t=222988. You do not need to read the thread; view the three videos in post one. View them until you can teach the use of the fibs to an imaginary student. Download the pdf that explains her method as well; this is a most useful read. After that, cut to the last few pages and read a few of aswilled's brilliant trade analyses.


I have added some extra sauce to Simone; please read the user guide for details.


This robot is the culmination of over 18 months personal development as a trader and coder through a variety of threads. I have long known that Fibs are the long-term way forward in trading, but could never quite work out the best way to use them. Simone Guy has provided the missing link. I traded her system manually last week whilst coding this robot; I made a lot of pips.


Those of you familiar with my work will notice the absense of screen feedback. I have left this out because the chart is already crowded, especially if the htf fibs are included.


Future development
Simone the robot trades 'basic Simone' + a trend direction filter i.e.

 

  1. Draw the Intraday fib
  2. Draw the breech fib
  3. Trade at a break of the 50% in the direction of the higher trend.



We need to consider ways of incorporating other tools at our disposal:

 

  1. The higher time frame fibs that Simone can draw for you – see user guide
  2. Trendlines etc



At some stage soon, I shall add code that allows different line lengths for the fibs to alleviate the problem of some of the levels being obscured. Simone's graphics are based on code provided by other coders – she is a collaborative effort. Luke is already looking at this; it involves hand-coding the fibs using trend lines, which is much more complicated than drawing them as a fib object.


Bugs
There could be a few bugs lurking in the undergrowth but there should not be many; Please report any that do crop up here. I developed Simone in my Epsilon Megastar thread and she has been well tested. Some seriously clever and talented people have contributed code when I have been stuck. I have sufficient faith that the basics are correct that I am putting Simone on a live account on Monday.


Posting restrictions
I have restricted the ability to post in this thread to: traders with at least 1 voucher; and traders on my 'buddy' list. I have done this because I do not want the thread cluttered with 'newbie' questions about the basics. New/inexperienced traders, this is not intended as a direct insult. What I want here is discussion with traders who fully understand what it is they are doing; when you newbs have been around a while, you will come to understand what a difference experience makes to the posts a member writes and shudder at the recollection of some of the questions you asked. I do. http://cdn.forexfactory.com/images/s..._the_floor.gif Go to your profile page; there is a link to the FF page that describes the voucher process.

Do not attempt to get around this by sending me pm's asking for help with your basic problems. Doing so will earn you an automatic ban from all of my threads.

Traders with experience who have not yet been vouched for, can get around this restriction be being added to my 'buddy' list; all you have to do is pm me to ask me to do this.

For new/confused traders, I have set up a partner thread to this one where you can ask your questions -

http://www.forexfactory.com/showthre...89#post3727389

I started this for Epsilon Megastar contributors, so we can adopt it here.


Robot check list
Here is a list of how Simone is intended to behave:

 

  1. Ascertain a trend direction when required and only trade in that direction
  2. Intraday fib:

    1. re-draw after a new hi-low is confirmed by a pull back to the 80.9/19.1
    2. re-draw after reaching T1 after even the slightest pull back

  3. Breech fib:

    1. Re-draw after a trade is taken, so that the breech pivot is always ahead of the market

      1. there will not always be a previous higher high/lower low on the 15M chart. In this case, Simone will cycle through successively higher tf's until it finds one. There is not yet any code to deal with the eventuality that the market is at an all-time hi-lo.

    2. The re-drawn breech pivot should be at least the minimum number of pips away from the old one, as specified in the inputs.

  4. Trading:

    1. Trade only during your specified trading hours
    2. Trade on a clean break of the breech pivot when the previous candle opened on the opposite side.
    3. Take profit is T1 +- the tolerance described in the user guide.
    4. Stop loss is R1/S1. I can build a few pips extra into this if required, so that the stop loss is placed slightly beyond these levels.
    5. When subsequent additional trades are taken, move the stop loss of the previous ones as specified in SG's thread.
    6. Will adjust the tp's following a re-draw of the Intraday fib leading to a higher T1.



I have coded vast numbers of trading robots in the last couple of years. Two of these appear to have some legs and are being traded live. Go to:

 

  1. http://www.forexfactory.com/showthread.php?t=233305 and download Steve Hopwood's Super_Signal auto trading robot.This one is a prime candidate for one of my live accounts.
  2. http://www.forexfactory.com/showthread.php?t=216557 and download Steve Hopwood's BS Moving Average and MACD combo.mq4


Installing updated versions of Simone
Nick has posted code that allows updated versions of Simone to retain your individual chart magic numbers (the charts do not need individual numbers but some people like having them for analysis purposes) and trading time settings. This means you can set up your individual charts happy in the knowledge that you will not have to re-set the inputs with every update. To update Her Royal Highness:

 

  1. close down your platform
  2. download the update
  3. restart the platform

Voila, individual settings retained. Breathtaking. Cheers Nick. You are a star. Everyone, please read Nick's post at http://www.forexfactory.com/showpost...&postcount=238 I have started attaching the .exe file to try to help those who experience difficulty with crashes.

Honours Board
This is my way of permanently saying thanks to those who have contributed to the coding of Simone (the robot that is, not Simone herself ).

Simone is the result of collaboration between a number of individuals. No's 1 & 2 in this list are immutable. The rest occur in no particular order and I am deeply grateful to you for the code/ideas/enlightenment/expertise you have provided:

 

  1. Simone Guy: without your strategy the robot could not have existed.
  2. Pathumracled: unless you had brought Simone's thread to my attention, the robot would never have been born.
  3. Nick (grandhombre)
  4. KnightHigh
  5. Luke (hndyman)
  6. scoobydoo
  7. rfking2


Let's see what kind of a pip-crunching monster we can develop here.
Simone stuff.mqh
Basic stuff.pdf
Simone user guide.pdf
Click-and-drag take profit and stop loss EA.mq4
Simone.mq4
Simone.ex4


pathumracled Jun 5, 2010 11:31am | Post# 2

A leader is...
 
Good Day Sir Hopwood, Family.
Bless you for your continued generosity.
On behalf of all, I offer sincere thanks. I am further humbled by your mentions, however, its only possible because of the Giants that have willingly shared and selflessly so, by the grace of My Lord and Savior.

May your gifts continue to be appreciated {Never taken fro granted or selfishly exploited}; only your good be remembered and the same be multiplied back to you & yours, as much as is desired.

Finally... To all the contributors, Madame Simoneg, Aswilled, Sir Hopwood, and all other participants:. Thank you. May you continue to have enough and remember to (always) leave some on the table.

Bless!

octomanoak Jun 5, 2010 11:37am | Post# 3

Good Day Sir Hopwood, Family.
Bless you for your continued generosity.
On behalf of all, I offer sincere thanks..
I could not have said it better.

octomanoak Jun 5, 2010 11:56am | Post# 4

Cannot get Simone to attach to a chart. Have placed Simone in Experts and SimoneStuff into experts/include in accordance with the user guide.

If I try to modify/compile on the trading platform I get multiple errors pertaining to SimoneStuff.

If I simply try to compile Simone, I get the error "simone stuff.mqh - cannot open the program."

peejaywk Jun 5, 2010 12:00pm | Post# 5

Cannot get Simone to attach to a chart. Have placed Simone in Experts and SimoneStuff into experts/include in accordance with the user guide.

If I try to recompile I get multiple errors pertaining to SimoneStuff.
Hi Octo,
I had similar problems. If you comment out the code at lines 11 and 810 then it will compile.
As Steve says in his introduction he has added the SimoneStuff to the bot but has not yet started to use the functionality.


Steve: Many thanks for this EA. Will put it onto one of my cent accounts next week.

PeeJay

SteveHopwood Jun 5, 2010 12:58pm | Post# 6

Sorry about that guys. I forgot to comment out the lines of code that refer to Simone stuff.mqh

You will find everything ok now.


Invisible Jun 5, 2010 1:50pm | Post# 7

90.1 or 19.1
 
Hello Steve

I think there is a typo in your post:

Intraday fib:

  1. re-draw after a new hi-low is confirmed by a pull back to the 80.9/90.1


I am not as familiar with this method as you seem to be, but I think this should be "80.9 / 19.1" if I am understanding Simone correctly.

I am looking forward to testing this new bot.

I must say, you are the EA world's equivalent of Edison and with all this great development and testing I am confident that some or many great bots are in the process of emerging.

Cheers

Invisible

SteveHopwood Jun 5, 2010 1:59pm | Post# 8

Hello Steve

I think there is a typo in your post:



I am not as familiar with this method as you seem to be, but I think this should be "80.9 / 19.1" if I am understanding Simone correctly.

I am looking forward to testing this new bot.

I must say, you are the EA world's equivalent of Edison and with all this great development and testing I am confident that some or many great bots are in the process of emerging.

Cheers

Invisible
Cheers.


grandehombre Jun 6, 2010 5:41am | Post# 9

Please make the following changes to the code and it will work.
(If it doesn't, I shall have to use a bigger cattleprod on it!)

Inserted Code
//bool           firstTime;

[b]#include <simone stuff.mqh>//grandehombre's library for preserving user's mn and trading times
[/b]
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
{

Eg, comment out the declaration of firstTime. Already done in the mqh file.
You *must* move the #include to just above init(). That way the variables it references (MagicNumber etc) will have already been defined.
The MQ4 compiler looks like a single-pass compiler; easier for the guys who wrote it, a real pain for us... c'est la vie

Cheers,
Nick

Hi Octo,
I had similar problems. If you comment out the code at lines 11 and 810 then it will compile.
As Steve says in his introduction he has added the SimoneStuff to the bot but has not yet started to use the functionality.


Steve: Many thanks for this EA. Will put it onto one of my cent accounts next week.

PeeJay

SteveHopwood Jun 6, 2010 5:48am | Post# 10

Nick has offered some code of breathtaking brilliance. Please read Installing updated versions of Simone in post 1 and download the latest version.

KingHigh has sent me the code to draw shorter fibs so we can tidy up the screen. I do not have the time to add this today, but shorter and tidier fibs are on their way.


SteveHopwood Jun 6, 2010 5:58am | Post# 11

One last thing before I go out.

Coding Simone is becoming something of a collaboration, so I want to add an 'honours board' to post 1.

Trouble is, apart from Nick and NightHigh, I cannot remember who contributed code/info about code whilst we were developing the bot in the EM thread.

I would like those of you who contributed to the coding to pm me, so I can add your name.


grandehombre Jun 6, 2010 7:41am | Post# 12

managing 4 and 5-digit conversions, as well as order placement checks
 
2 Attachment(s)
(also posted on http://www.forexfactory.com/showpost...7&postcount=43)

Here is another include file I use that helps manage 4 and 5-digit conversions, as well as order placement checks.

Make a call to calcDigits() inside your init().
The attached mqh file contains info on how to use the variables that the above call sets up.

Briefly,


Inserted Code
//To convert pips to price (or stoploss or takeprofit),
double stopLoss = OrderOpenPrice() -  (25[b] * pips2dbl[/b]);// 25 pip stop

//To find diff between 2 prices, in pips
int currentPipsInProfit = (Bid - OrderOpenPrice()) * [b](1 / pips2dbl)[/b]; // for a BUY order


So, in the case of an EA that looks after open orders (moving SL, taking profits etc), it is easier to simply calculate the PipsInProfit and then just treat them as a simple number, i.e after a profit of 25 pips, take x lots as profit becomes
Inserted Code
int currentPipsInProfit = (Bid - OrderOpenPrice()) * [b](1 / pips2dbl)[/b]; // for a BUY order

if (currentPipsInProfit > 25)
{
  // get me some ouzo!
}

No need to worry about 4, 5 or 6 digit brokers.

The attached screenshots show the results.

------
The attached mqh also includes the function _IsTradeAllowed().
Have a look in the file for more info on how it works.

Inserted Code
    // dummy (single iteration) loop to allow multiple exits to a single point in code
for(int dummyCtr=0;dummyCtr == 0; dummyCtr++)
{
// check whether trade context is free
int tradeAllow = _IsTradeAllowed();
if(tradeAllow < 0)
{
retCode = "Could not modify order #" + orderNumber + ". Trading context is not free. Code: " + tradeAllow;
break;
}

if(tradeAllow == 0)
{
RefreshRates();
// recalculate the Take Profit and Stop Loss levels
}

res = OrderModify(orderNumber, OrderOpenPrice(), newSL, OrderTakeProfit(), 0, whatColor);
if (!res)
{
err = GetLastError();
retCode = ErrorDescription(err);
if (err <= ERR_NO_RESULT)
{
retCode = "";
res = true;
break;
}
}
            } // for....

      // Common exit point from above loop. Lets put cleanup code here
      // blah blah

    

     // The function should only exit from [b]one[/b] point.
     return(0);
}

Finally,
The digit-handler code came from http://codebase.mql4.com/6502
The ok-to-order code came from http://articles.mql4.com/141

Cheers,
Nick
Name:  4digits.png
Views: 13381
Size:  4 KB
Name:  5digits.png
Views: 13396
Size:  4 KB

camvcvoo Jun 6, 2010 8:13am | Post# 13

Excellent effort!
 
As usual, benefiting from Steve's brilliant work quietly.

hndymann Jun 6, 2010 8:20am | Post# 14

Nick has offered some code of breathtaking brilliance. Please read Installing updated versions of Simone in post 1 and download the latest version.

KingHigh has sent me the code to draw shorter fibs so we can tidy up the screen. I do not have the time to add this today, but shorter and tidier fibs are on their way.

Bah, I just finished the code too... oh well If its more efficient than mine below, use his
FibLength double variables are in hours
So the difference of high and low fibs will be drawn x hours apart. If the value is 0 the fib length will be infinite.

Inserted Code
if (Name == breech)
      {
         ObjectCreate(Name,OBJ_FIBO,0,OpenTime,HighPrice,CloseTime+(BreechFibLength*60*60),LowPrice);
         ObjectSet(Name, OBJPROP_RAY,false);
         if (BreechFibLength == 0.0) ObjectSet(Name, OBJPROP_RAY,true);
      }//if (Name == breech)
      
      if (Name == intraday)
      {
         ObjectCreate(Name,OBJ_FIBO,0,OpenTime,HighPrice,CloseTime+(IntradayFibLength*60*60),LowPrice);
         ObjectSet(Name, OBJPROP_RAY,false);
         if (IntradayFibLength == 0.0) ObjectSet(Name, OBJPROP_RAY,true);
      }//if (Name == intraday)
      
      if (Name == monthly)
      {
         ObjectCreate(Name,OBJ_FIBO,0,OpenTime,HighPrice,CloseTime+(MonthlyFibLength*60*60),LowPrice);
         ObjectSet(Name, OBJPROP_RAY,false);
         if (MonthlyFibLength == 0.0) ObjectSet(Name, OBJPROP_RAY,true);
      }//if (Name == monthly)
      
      if (Name == weekly)
      {
         ObjectCreate(Name,OBJ_FIBO,0,OpenTime,HighPrice,CloseTime+(WeeklyFibLength*60*60),LowPrice);
         ObjectSet(Name, OBJPROP_RAY,false);
         if (WeeklyFibLength == 0.0) ObjectSet(Name, OBJPROP_RAY,true);
      }//if (Name == weekly)
      
      if (Name == daily)
      {
         ObjectCreate(Name,OBJ_FIBO,0,OpenTime,HighPrice,CloseTime+(DailyFibLength*60*60),LowPrice);
         ObjectSet(Name, OBJPROP_RAY,false);
         if (DailyFibLength == 0.0) ObjectSet(Name, OBJPROP_RAY,true);
      }//if (Name == daily)

Pat1 Jun 6, 2010 8:48am | Post# 15

Intraday Fib
 
Hi Steve,

Looks like the Intraday fib is not being reinitialized on the day change.

The Breech Fib does not hold the high or low of the day and constantly resizes the end points when it should hold either the high or low and change based on previous lower or higher fractals and the realized trend.

As of now, with an initial run on EUM15, it tends to buys highs and sell lows with htf rsi period 60 as well as 15.

Trading Hours are set at 27/5. Maybe that's the issue. Going through the code for a fib reset it compares the old bars to new bars so technically it should reinitialize.

Just some observations. Sincerely hope the above observation is not correct.

Pat

grandehombre Jun 6, 2010 12:08pm | Post# 16

Neat debug message console
 
1 Attachment(s)
One of the things I always make sure I have for my apps, is a way to display debug info without interfering with the app's output or writing war&peace in log files.

I am actually half-heartedly writing a message logging DLL for MT4 that is written in ... Pascal (freepascal), but that's just my way of giving the brain a chance to go nuts. Strange? yeap!

Anyway, I won't be inflicting that on anyone. Here is what I also use to view debug messages from my mq4 code.

Inserted Code
#import "kernel32.dll"
string OutputDebugStringW(string msg);  // Unicode
string OutputDebugStringA(string msg);   // ANSI
#import


function blahblah()
{
OutputDebugStringA("Hello world!");
OutputDebugStringA("Yiassou kosme!");

OutputDebugStringA(
StringConcatenate("Nick", 
                   "IntradayFibHigh = ", IntradayFibHigh, NL,
                   "IntradayFibLow = ", IntradayFibLow, NL,
                   "Today high = ", iHigh(NULL, 1440, 0), NL,
                   "Today low = ", iLow(NULL, 1440, 0), NL));

// etc etc
}

The above will always send those messages to the Win32 kernel, regardless.
Now, if you also happen to have the following util running, you will be able to see those messages in a scrolling window.
The attached image shows you what it would look like.

Please keep in mind that DebugView shows ***ALL*** the messages being sent to the kernel, not just yours!
You can filter them by
- finding the PID of the MT4 process (Terminal.EXE). Do this by starting up TaskManager and looking at the PID of terminal.exe
- In DebugView, set a filter to that PID.
The attached image shows how it is done.

Cheers,
Nick
Click to Enlarge

Name: Image 9.png
Size: 85 KB

grant18265 Jun 6, 2010 1:51pm | Post# 17

Global close question
 
Hi Steve,

Firstly many thanks to you and all the great minds that have contributed thus far with this project.

a quick question on the % closure, if i leave this as the 5% default and my trades get closed at the 5%, when will it reset itself? with the next new fib drawn or the next day (midnight)...

again many thanks

Grant

ps, have looked here and in epsilon thread but couldnt find an answer....

simoneg Jun 6, 2010 2:48pm | Post# 18

Excellent
 
Hi Steve,

I must say that I am thrilled, happy, excited and impressed all in one to see this accomplished, and in such a short space of time. How can I say thanks enough, for your efforts, persistence and great results. It appears to me that the bigger hurdles have been cleared and that, as is, Simone has already began to prove its potential.
Excellent Work!

Looking forward to the upcoming week!

Many Blessings!

SteveHopwood Jun 6, 2010 3:57pm | Post# 19

Bah, I just finished the code too... oh well...
Cheers Luke. You are a star.

xxxFibLength are external inputs within the robot's fib input section? What are the defaults?


SteveHopwood Jun 6, 2010 3:59pm | Post# 20

Hi Steve,

I must say that I am thrilled, happy, excited and impressed all in one to see this accomplished, and in such a short space of time. How can I say thanks enough, for your efforts, persistence and great results. It appears to me that the bigger hurdles have been cleared and that, as is, Simone has already began to prove its potential.
Excellent Work!

Looking forward to the upcoming week!

Many Blessings!
Couldn't have done it without you, Simone.

The basic bot works fine; we are just looking at the cosmetics for now.



© Forex Factory