Enter On Time

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

Enter On Time

Postby sho-me-pips » Sat Feb 11, 2012 11:28 am

FIFO Compliant
This is used at the exact close of USD/JPY trade session (30 min signal, 15 min fractal. 10 pip limit)

~~If D_Oscillator Buff1<Buff2 place sell market order or if D_Oscillator Buff1>Buff2 place buy market order at specified time. Standard limit. Choice of stop, standard, trailing, fractal. If fractal stop is chosen, enter a reversing market order when fractal stop is hit.~~

I haven't learned how to code the remaining parts...



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

strategy.parameters:addGroup("D oscillator parameters");
strategy.parameters:addString("TF", "Time Frame", "", "H2");
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("Trading Parameters");
strategy.parameters:addBoolean("AllowTrade", "Allow strategy to trade", "", false);
strategy.parameters:addString("Account", "Account to trade on", "", "");
strategy.parameters:setFlag("Account", core.FLAG_ACCOUNT);
strategy.parameters:addString("TIME", "Time", "The time of day the trade should be opened (hh:mm). The time is specified in the local time zone.", "hh:mm");
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", "% Of Balance To Use", "", 3%, .1%, 50%);
~~Bal Formula =ROUNDDOWN((Balance*DividedBy)/MMR,0,.01))~~

strategy.parameters:addBoolean("SetLimit", "Set Limit Orders", "", false);
strategy.parameters:addInteger("Limit", "Limit Order in pips", "", 30, 1, 10000);
strategy.parameters:addBoolean("SetStop", "Set Stop Orders", "", false);
strategy.parameters:addInteger("Stop", "Stop Order in pips", "", 30, 1, 10000);
strategy.parameters:addBoolean("TrailingStop", "Trailing stop order", "", false);
strategy.parameters:addBoolean("FractalStop", "Set Fractal Stop Orders", "", false);
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("Period", "Timeframe", "", "m30");
strategy.parameters:addInteger("Timeout", "How often change stop (in seconds)", "", 60, 1, 60);

strategy.parameters:addBoolean("ReverseOrder", "Place Reversing Market Order After Fractal Stop", "", true);
strategy.parameters:addInteger("Orders", "Number Orders", "", 1, 1, 15);

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);
"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: Enter On Time

Postby Apprentice » Sun Feb 12, 2012 4:07 am

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

Re: Enter On Time

Postby Alexander.Gettinger » Thu Apr 25, 2019 8:54 pm

Please try this strategy:
Steady_Strategy.lua
(10.59 KiB) Downloaded 275 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 24 guests