Fractal Gains

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Fractal Gains

Postby sho-me-pips » Wed Feb 15, 2012 8:58 am

FIFO Compliant

Manual back testing produced over 1000 pips in approx 3 months

~~If D_Oscillator Buff1<Buff2 place sell entry order on low fractal or if D_Oscillator Buff1>Buff2 place buy entry order on high fractal. Stop will be opposing fractal.~~



Code: Select all
function Init() --The strategy profile initialization
strategy:name("Fractal Gain Strategy");
strategy:description("Fractal Gain Strategy ");

strategy.parameters:addGroup("D oscillator parameters");
strategy.parameters:addString("TF", "Time Frame", "", "H4"); --D-Oscillator trend time frame--
strategy.parameters:addInteger("RSI_Period", "RSI_Period", "", 21);
strategy.parameters:addInteger("D_Period", "D_Period", "", 15);
strategy.parameters:addInteger("CCI_Period", "CCI_Period", "", 21);
strategy.parameters:addDouble("CCI_Coeff", "CCI_Coeff", "", 0.4);
strategy.parameters:addInteger("Smooth", "Smooth", "", 20);

strategy.parameters:addGroup("Margin Requirements");
strategy.parameters:addBoolean("UseMargin", "Use Margin To Control Trades", "", true);
strategy.parameters:addInteger("StopMargin", "Percentage to stop adding new trades", "", 90, 1, 100)

strategy.parameters:addGroup("Trading Parameters");
strategy.parameters:addBoolean("AllowTrade", "Allow strategy to trade", "", false);
strategy.parameters:addString("Period", "Chart Time Frame", "", "H2"); --Time frame for trade excution--
strategy.parameters:addString("Account", "Account to trade on", "", "");
strategy.parameters:setFlag("Account", core.FLAG_ACCOUNT);
strategy.parameters:addString("TradeType", "Use Balance or Fixed Lot", "", "Bal");
strategy.parameters:addStringAlternative("TradeType", " FixedLot ", "", "FL");
strategy.parameters:addStringAlternative("TradeType", "Balance", "", "Bal");
strategy.parameters:addInteger("Amount", "Trade Amount in Lots", "", 1, 1, 1000);
strategy.parameters:addInteger("DividedBy", "Amount Of Account To Use", "", 3%, .1%, 50%);
~~Bal Formula =ROUNDDOWN((Balance*DividedBy)/MMR,0,.01))(Example: Balance is $50000.00 you wish to use 5% of balance= $2500.00 divide by MMR of EUR $30.00=83.333 mirco lots rounded down to 83)~~

strategy.parameters:addBoolean("SetLimit", "Set Limit Orders", "", false);
strategy.parameters:addInteger("Limit", "Limit Order in pips", "", 30, 1, 10000);
strategy.parameters:addGroup("Fractal Parameters");
strategy.parameters:addInteger("Frame", "Number of bars for fractals (Odd)", "", 5, 3, 99);
strategy.parameters:addGroup("Stop Parameters");
strategy.parameters:addInteger("Indent", "Indent from fractal", "", 0, 0, 1000);
strategy.parameters:addBoolean("MoveBack", "Move stop back", "", false);
strategy.parameters:addString("Type", "Price type", "", "Auto");
strategy.parameters:addStringAlternative("Type", "Bid", "", "Bid");
strategy.parameters:addStringAlternative("Type", "Ask", "", "Ask");
strategy.parameters:addStringAlternative("Type", "Auto", "", "Auto");~~buy=bid sell=ask~~
strategy.parameters:addString("FPeriod", "Timeframe", "", "m15"); --Fractal time frame--
strategy.parameters:addInteger("Timeout", "How often to check stop (in seconds)", "", 60, 1, 60);--Check for stop; if no stop set stop on fractal--

strategy.parameters:addGroup("Notification");
strategy.parameters:addBoolean("ShowAlert", "Show Alert", "", false);
strategy.parameters:addBoolean("PlaySound", "Play Sound", "", false);
strategy.parameters:addBoolean("RecurSound", "Recurrent Sound", "", false);
strategy.parameters:addString("SoundFile", "Sound File", "", "");
strategy.parameters:setFlag("SoundFile", core.FLAG_SOUND);
strategy.parameters:addBoolean("SendEmail", "Send Email", "", false);
strategy.parameters:addString("Email", "Email", "", "");
strategy.parameters:setFlag("Email", core.FLAG_EMAIL);
Attachments
FactalGain.png
Last edited by sho-me-pips on Thu Jul 12, 2012 1:33 pm, edited 1 time in total.
"A hundred pips a day keeps the collector away"
User avatar
sho-me-pips
 
Posts: 82
Joined: Sat Sep 11, 2010 8:38 am

Re: Fractal Gains

Postby Apprentice » Thu Feb 16, 2012 2:27 am

I'm not sure What is the purpose of your post.
The request to write strategy.
Or share your desire with our community.

If first, can you give us a link for D oscillator.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Fractal Gains

Postby sho-me-pips » Thu Feb 16, 2012 7:12 am

"A hundred pips a day keeps the collector away"
User avatar
sho-me-pips
 
Posts: 82
Joined: Sat Sep 11, 2010 8:38 am

Re: Fractal Gains

Postby Apprentice » Fri Feb 17, 2012 2:54 am

Your request is added to the development list.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Fractal Gains

Postby sho-me-pips » Wed May 30, 2012 6:34 pm

Do you have a status on this strategy? How far down the list is this one?
"A hundred pips a day keeps the collector away"
User avatar
sho-me-pips
 
Posts: 82
Joined: Sat Sep 11, 2010 8:38 am

Re: Fractal Gains

Postby Alexander.Gettinger » Mon Apr 22, 2019 9:46 pm

Please try this strategy:
Fractal Gains Strategy.lua
(13.77 KiB) Downloaded 440 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Fractal Gains

Postby yolerap » Fri Sep 13, 2019 5:39 am

Hello Apprentice,

Could you add the option for the fractal gains strategy :

1) Maximum of number open position in any directions
2) Maximum of number open position in one direction
3) Allow side

I don't know what is weird and how the strategy running because when the parameters are adjust :
Account balance : 2000 euros
Lot size : 1K
The benefits are +3600euros

However, when the parameters are adjust like this :
Account balance : 20000euros
Lot size : 1K
The benefits are +500 euros...

There is a big difference while the strategy parameters are the same..

Thank you for your works
yolerap
FXCodeBase: Initiate
 
Posts: 103
Joined: Sat Aug 17, 2019 9:44 pm

Re: Fractal Gains

Postby Apprentice » Fri Sep 13, 2019 6:25 am

Your request is added to the development list.
Development reference 88.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Google [Bot] and 9 guests