The Forex Autopilot and FapTurbo Forum

This forum provides free community support for the following expert advisors (forex robots):
FapTurbo - Most Popular (Fapturbo version 50 is out!)
Forex Autopilot System




Recommended: FAP Turbo Expert Guide - Make the most of FAP Turbo

Anyone interested in our own Forex VPS solution? Click here to find out more!

(Unlimited Memory & Bandwidth - host as many forex robots as you want!)

Attention Visitor:
You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   The Forex Autopilot and FapTurbo Forum > Main FapTurbo Forum > FapTurbo Settings and Back-Testing

Sponsors
Top Forex VPS Providers
MetaTrader 4 (MT4) Forex Brokers


Notices

FapTurbo Settings and Back-Testing New threads posted to this board should include a log of back-testing results as well as the settings used to arrive at them.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-21-2008, 12:31 AM
xchaparro xchaparro is offline
Member
 
Join Date: Dec 2008
Posts: 83
Thanks: 0
Thanked 27 Times in 7 Posts
Default EA to help FAPTurbo long results

I am working on creating a EA to help with the stop loss on the long strategy. I am looking people to test it and improve it. I am getting better results than the default settings on the fapturbo on all my backtests.
I am using these settings

FapTurbo_Lots=0.00000000
FapTurbo_LotsRiskReductor=2.00000000
FapTurbo_MaxOrders=2
FapTurbo_MaxLots=10
FapTurbo_StopTime=9
FapTurbo_aaa=35
FapTurbo_bbb=48
FapTurbo_TakeProfit=20.00000000
FapTurbo_StopLoss=600.00000000
FapTurbo_TrailingStop=0.00000000
FapTurbo_DurationInHours=0
FapTurbo_CloseAfterXmonths=0
FapTurbo_PeriodMALarge=100
FapTurbo_PeriodMASmall=30
FapTurbo_PriceMA_0_6=0
FapTurbo_TypeMA_0_3=0
FapTurbo_ShiftMALarge=3
FapTurbo_ShiftMASmall=1
FapTurbo_LookForDays=2
FapTurbo_CriticalDays=0
FapTurbo_RelaxDays=0
FapTurbo_HedgingLotReducer=0.00000000
FapTurbo_Hedging=0
FapTurbo_TradeNFP=1
FapTurbo_TradeFriday=1
FapTurbo_Prudent=0
FapTurbo_SymAlligatorOnCritica=1
FapTurbo_FixedDirection=1
FapTurbo_ClsLsrOnMrktChnge=0
FapTurbo_AlwaysTrade=0
FapTurbo_LowLot=0.10000000
FapTurbo_TooGoodToBeTrue=50
FapTurbo_PrudentPeriod=30
FapTurbo_StartWorkTimeHour=0
FapTurbo_StartWorkTimeMin=0
FapTurbo_EndWorkTimeHour=0
FapTurbo_EndWorkTimeMin=0
FapTurbo_OneTrade=0
FapTurbo_SpanGator=0.50000000
FapTurbo_SlipPage=3

Safeguard Settings
FapTurbo_TakeProfit = 20;
FapTurbo_StopLoss=600.0;
InitialStop=300.0;
Margin=150.0;
Factor=2;
Trailstop=100;

InitialStop is the level where the EA open the opposite trade.
Margin is the stop loss of the opposite trade and break even level
Factor is the multiplier of the lot size for the opposite trade.

The way it work when the trade reach the value InitialStop - Margin reset SL and TP.
When reaches InitialStop open a trade in the opposite direction with SL = Margin and TP = SL of the initial trade
If the trade reverse is closed by the SL
If the trade reach InitialStop + Margin move the SL to break even.
If the first opposite trade was closed by SL and the initial move back to the negative, the second opposite trade will open at InitialStop + margin avoiding possible up and down aroung the InitialStop. After the trade is close by stop loss the hedging one continues with trailing stop.

I fixed some bugs. here is the updated file.
Attached Files
File Type: mq4 SafeGuard4.6.mq4 (16.2 KB, 244 views)

Last edited by xchaparro; 02-03-2009 at 11:03 PM. Reason: Update version 4.6
Reply With Quote
The Following 19 Users Say Thank You to xchaparro For This Useful Post:
4luke6 (01-21-2009), cameronqueen (01-30-2009), ceechange (01-16-2009), cestlav (06-20-2009), Harre (01-30-2009), Hog (01-27-2009), JasonSTX (02-12-2009), jolinsz (01-31-2009), jtv (02-04-2009), kitty (01-18-2009), Milen (02-08-2009), oofdah (02-04-2009), pavlus (02-01-2009), RiOT! (02-07-2009), Simmo (01-19-2009), sna004 (01-21-2009), Sooner (02-18-2009), wendellzlee (01-24-2009), zenglen (02-08-2009)

  #2  
Old 12-21-2008, 03:23 PM
limitup limitup is offline
Senior Member
 
Join Date: Nov 2008
Posts: 375
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by xchaparro View Post
I am working on creating a EA to help with the stop loss on the long strategy. I am looking people to test it and improve it. I am getting better results than the default settings on the fapturbo no all my backtests.
I am using these settings

FapTurbo_Lots=0.00000000
FapTurbo_LotsRiskReductor=1.00000000
FapTurbo_MaxOrders=3
FapTurbo_MaxLots=10
FapTurbo_StopTime=9
FapTurbo_aaa=35
FapTurbo_bbb=48
FapTurbo_TakeProfit=20.00000000
FapTurbo_StopLoss=600.00000000
FapTurbo_TrailingStop=0.00000000
FapTurbo_DurationInHours=0
FapTurbo_CloseAfterXmonths=0
FapTurbo_PeriodMALarge=100
FapTurbo_PeriodMASmall=30
FapTurbo_PriceMA_0_6=0
FapTurbo_TypeMA_0_3=0
FapTurbo_ShiftMALarge=3
FapTurbo_ShiftMASmall=1
FapTurbo_LookForDays=2
FapTurbo_CriticalDays=45
FapTurbo_RelaxDays=0
FapTurbo_HedgingLotReducer=0.00000000
FapTurbo_Hedging=0
FapTurbo_TradeNFP=1
FapTurbo_TradeFriday=1
FapTurbo_Prudent=0
FapTurbo_SymAlligatorOnCritica=1
FapTurbo_FixedDirection=1
FapTurbo_ClsLsrOnMrktChnge=0
FapTurbo_AlwaysTrade=0
FapTurbo_LowLot=0.10000000
FapTurbo_TooGoodToBeTrue=50
FapTurbo_PrudentPeriod=30
FapTurbo_StartWorkTimeHour=0
FapTurbo_StartWorkTimeMin=0
FapTurbo_EndWorkTimeHour=0
FapTurbo_EndWorkTimeMin=0
FapTurbo_OneTrade=0
FapTurbo_SpanGator=0.50000000
FapTurbo_SlipPage=3
A signal bridge to a currenex or ECN account from a demo would be more helpful
__________________
"Markets are like bacteria: always, mutating and looking to kill you" --VICTOR SPERANDEO
Reply With Quote
  #3  
Old 12-21-2008, 10:16 PM
^eagle^ ^eagle^ is offline
Super Moderator
 
Join Date: Sep 2008
Posts: 827
Thanks: 13
Thanked 18 Times in 18 Posts
Default

Quote:
Originally Posted by xchaparro View Post
I am working on creating a EA to help with the stop loss on the long strategy. I am looking people to test it and improve it. I am getting better results than the default settings on the fapturbo no all my backtests.
I am using these settings

FapTurbo_Lots=0.00000000
FapTurbo_LotsRiskReductor=1.00000000
FapTurbo_MaxOrders=3
FapTurbo_MaxLots=10
FapTurbo_StopTime=9
FapTurbo_aaa=35
FapTurbo_bbb=48
FapTurbo_TakeProfit=20.00000000
FapTurbo_StopLoss=600.00000000
FapTurbo_TrailingStop=0.00000000
FapTurbo_DurationInHours=0
FapTurbo_CloseAfterXmonths=0
FapTurbo_PeriodMALarge=100
FapTurbo_PeriodMASmall=30
FapTurbo_PriceMA_0_6=0
FapTurbo_TypeMA_0_3=0
FapTurbo_ShiftMALarge=3
FapTurbo_ShiftMASmall=1
FapTurbo_LookForDays=2
FapTurbo_CriticalDays=45
FapTurbo_RelaxDays=0
FapTurbo_HedgingLotReducer=0.00000000
FapTurbo_Hedging=0
FapTurbo_TradeNFP=1
FapTurbo_TradeFriday=1
FapTurbo_Prudent=0
FapTurbo_SymAlligatorOnCritica=1
FapTurbo_FixedDirection=1
FapTurbo_ClsLsrOnMrktChnge=0
FapTurbo_AlwaysTrade=0
FapTurbo_LowLot=0.10000000
FapTurbo_TooGoodToBeTrue=50
FapTurbo_PrudentPeriod=30
FapTurbo_StartWorkTimeHour=0
FapTurbo_StartWorkTimeMin=0
FapTurbo_EndWorkTimeHour=0
FapTurbo_EndWorkTimeMin=0
FapTurbo_OneTrade=0
FapTurbo_SpanGator=0.50000000
FapTurbo_SlipPage=3
So you would add this EA to the same chart as fapturbo and it would adjust Stop loss? That is bring it up based on price movement once it was well into profit?
Reply With Quote
  #4  
Old 12-22-2008, 12:29 PM
xchaparro xchaparro is offline
Member
 
Join Date: Dec 2008
Posts: 83
Thanks: 0
Thanked 27 Times in 7 Posts
Default

so far create a opposite trade when reaches a specific value. I would like to include some indicator like MA to make it smarter
Reply With Quote
  #5  
Old 12-24-2008, 11:45 AM
JasonSTX JasonSTX is offline
Member
 
Join Date: Dec 2008
Posts: 61
Thanks: 1
Thanked 0 Times in 0 Posts
Default

you run this EA on a EURUSD M1 chart and FAPT Long Term on a separate EURUSD M1 chart.

It will open an opposite trade when you hit -100, this hedges your loss so you will no lose as much on a -500 stop loss.

http://www.fapturbo.com/forum/viewto...54d8f6cfccce5e

fapturbo forum post on this for more information. I think it is a great idea.

Quote:
Originally Posted by limitup View Post
A signal bridge to a currenex or ECN account from a demo would be more helpful
Oh, Here is a quick bridge that I wrote for exporting all open orders to an XML file.

Code:
//+------------------------------------------------------------------+
//|                                                   RSS Export.mq4 |
//|                                                         jasonstx |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "jasonstx"
#property link      ""

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
string YourRSSTitle="RSS Exporter";
string YourDesc="Script to export open and closed orders to an XML file.  Will be placed in the files directory.";
string filename="test.xml";
int start()
  {
  while (IsConnected())
  {
     WriteXMLFile(GetOpenedData(),GetClosedData());
     Sleep(5000);
  }
  
  
  
   return(0);
  }
 
 string GetOpenedData()
 {
 string ret="";
 for(int i=0;i<OrdersTotal();i++)
   {
    if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;
      int YourTicket1=OrderTicket();
      datetime YourDateTimeOpened1=OrderOpenTime();
      string YourOrderType1=OrderType();
      double YourLotSize1=OrderLots();    
      double YourPrice1=OrderOpenPrice();
      string YourPair1=OrderSymbol();
      ret=ret+CreateOpenOrdersXML(YourTicket1,YourOrderType1,YourDateTimeOpened1,YourPair1,YourLotSize1,YourPrice1,YourOrderType1);
   }
   return (ret);
 }
 string GetClosedData()
 {
 string ret="";
 for(int x=0;x<OrdersHistoryTotal();x++)
   {
    if (OrderSelect(x,SELECT_BY_POS,MODE_HISTORY)==false) break;
      int YourTicket2=OrderTicket();
      datetime YourDateTimeOpened2=OrderOpenTime();
      datetime YourDateTimeClosed2=OrderCloseTime();
      string YourOrderType2=OrderType();
      double YourLotSize2=OrderLots();    
      double YourPrice2=OrderOpenPrice();
      double YourProfit2=OrderProfit();
      string YourPair2=OrderSymbol();
      ret=ret+CreateClosedOrdersXML(YourTicket2,YourOrderType2,YourDateTimeOpened2,YourDateTimeClosed2,YourPair2,YourLotSize2,YourPrice2,YourProfit2, YourOrderType2);
   }
   return (ret);
 }
 
 
 
 
 void WriteXMLFile(string openeddata, string closeddata)
 {
   string start = GetXMLOpen();
   string end = GetXMLClose();
   int handlerss=FileOpen(filename, FILE_WRITE, ';');               
   
   if(handlerss>0)                                                 
    {
    FileWrite(handlerss,start+"<openorders>"+openeddata+"</openorders>"+"<closedorders>"+closeddata+"</closedorders>"+end);
    FileClose(handlerss);
    } else {
      MessageBox("ERROR WRITING RSS FILE","ERROR",0);
     }
 }
  
   
 string CreateOpenOrdersXML(int YourTicket, string YourOrderType, datetime YourDateTimeOpened,string YourPair, double YourLotSize, double YourPrice,string YourOrderType)
 {
   string ret = "";
   ret=
   "<item>"+
   "<description>Open Order</description>"+
   "<ticket>"+YourTicket+"</ticket>"+
   "<datetime>"+YourDateTimeOpened+"</datetime>"+
   "<pair>"+YourPair+"</pair>"+
   "<lotsize>"+YourLotSize+"</lotsize>"+
   "<type>"+YourOrderType+"</type>"+
   "<price>"+YourPrice+"</price>"+
   "<ordertype>"+YourOrderType+"</ordertype>"+
   "</item>";
   return (ret);
 
 }
 
 string CreateClosedOrdersXML(int YourTicket,string YourOrderType, datetime YourDateTimeOpened,datetime YourDateTimeClosed,string YourPair, double YourLotSize, double YourPrice, double YourProfit, string YourOrderType)
 {
   string ret = "";
   ret=
   "<item>"+
   "<description>Closed Order</description>"+
   "<ticket>"+YourTicket+"</ticket>"+
   "<datetime>"+YourDateTimeOpened+"</datetime>"+
   "<datetimeclosed>"+YourDateTimeClosed+"</datetimeclosed>"+
   "<pair>"+YourPair+"</pair>"+
   "<lotsize>"+YourLotSize+"</lotsize>"+
   "<type>"+YourOrderType+"</type>"+
   "<price>"+YourPrice+"</price>"+
   "<ordertype>"+YourOrderType+"</ordertype>"+
   "<profit>"+YourProfit+"</profit>"+
   "</item>";
   return (ret);
 
 }
 
 string GetXMLOpen()
 {
   string ret = "<?xml version=\"1.0\"?><rss version=\"0.91\">"+
   "<channel>"+
   "<title>"+YourRSSTitle+"</title>"+
   "<description>"+YourDesc+"</description>";

   return (ret);
 }
 
 string GetXMLClose()
 {
   string ret = "</channel></rss>";
   
   return (ret);
 } 
  
  
  
//+------------------------------------------------------------------+
Its a script, not an EA, so you can drag it onto any open chart, it doesn't matter which. It will update the file every 5 seconds.

Someone can use this to write another script to import the orders into any other trading platform they want.

Last edited by JasonSTX; 12-24-2008 at 11:51 AM.
Reply With Quote
  #6  
Old 12-25-2008, 04:16 AM
ardor ardor is offline
Junior Member
 
Join Date: Dec 2008
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

xchaparro

What, if anything, would we need to change for SafeGuard to work with Zanwonton's EA

ardor

Last edited by ardor; 12-25-2008 at 04:19 AM.
Reply With Quote
  #7  
Old 12-26-2008, 03:14 PM
xchaparro xchaparro is offline
Member
 
Join Date: Dec 2008
Posts: 83
Thanks: 0
Thanked 27 Times in 7 Posts
Default

Quote:
Originally Posted by ardor View Post
xchaparro

What, if anything, would we need to change for SafeGuard to work with Zanwonton's EA

ardor
You can use it with any EA, just put it in a different chart. This is a variable stop loss that modify the stop loss setting on the order to minimize the losses.

Last edited by xchaparro; 12-28-2008 at 11:25 PM.
Reply With Quote
  #8  
Old 12-27-2008, 07:59 PM
ardor ardor is offline
Junior Member
 
Join Date: Dec 2008
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by xchaparro View Post
You can use it with any EA, just put it in a different chart. This is a variable stop loss that modify the stop loss setting on the order to minimize the losses.
Aha !!! Thanks for the info. I'll give it a go.

ardor
Reply With Quote
  #9  
Old 12-30-2008, 12:07 PM
xchaparro xchaparro is offline
Member
 
Join Date: Dec 2008
Posts: 83
Thanks: 0
Thanked 27 Times in 7 Posts
Default

Quote:
Originally Posted by Miksa View Post
sorry, i don't get it. why would one need "an EA to help fapturbo long results"?

what is the benefit of opening an opposite trade / hedge comparing to just setting SL = 100 to automatically close "a trade when you hit -100"?
If you configure SL 100 you will lose a lot of money because about 30 % of the trades go over 100 pip but only 10 % go further. The idea is create a opposite trade at -300 pip with SL -600 if the trade reverse should brake even. If the trade stop at -600 you only lose 300 pips. I did the math and the % of trades decrease by almost half every 100 pips
Reply With Quote
  #10  
Old 01-04-2009, 10:01 AM
Ganglion Ganglion is offline
Junior Member
 
Join Date: Dec 2008
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have a small question. How were you able to backtest this hedging EA? Is it possible to backtest two EAs at the same time?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


FapTurbo
Forex Autopilot System



These are the 100 most searched terms
Search Cloud
alpari uk gmt offset autopilot forum fab turbo fab turbo forum fab turbo settings fabturbo forum fabturbo settings fap settings fap turbo forum fap turbo settings faprobot faps forum fapsturbo fapturbo fapturbo dll fapturbo forum fapturbo forums fapturbo key fapturbo mq4 fapturbo settings fapturbo.dll fapturbo.ex4 fapturbo.mq4 fapturbo16 fapturbo16.ex4 fapturbo3.dll forex auto pilot forum forex autopilot forex autopilot forum forex autopilot key forex autopilot member zone forex autopilot members forex autopilot members area forex autopilot members zone forex autopilot members zone 125 forex autopilot settings forexautopilot forum forexautopilotforum forexautopilotforum.com fxparazitescalper gods gift ea meta4 brokers mt4 nifty mt4stats nfp pilot pipturbo setting fab turbo spangator ultra trend indicator www.forexautopilotforum.com ... powered by Simple Search Cloud

All times are GMT -5. The time now is 11:07 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

Skin design by bogu@project-voyageur

C-Logic SEO 1.0.3 by Computer-Logic.org
Ad Management by RedTyger