Job finished
Execution time 4 days
Specification
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Hiubris_Indicators
//@version=5
strategy(title = "TTS EMA STC Strategy", overlay = true, default_qty_value = 100, initial_capital=100000,default_qty_type=strategy.percent_of_equity, pyramiding=0, process_orders_on_close=true)
// TTS
Length = input.int(21, minval=1, group=' Trend Trader')
Multiplier = input.float(3, minval=0.000001, group=' Trend Trader')
tts(Length, Multiplier) =>
avgTR = ta.wma(ta.atr(1), Length)
highestC = ta.highest(Length)
lowestC = ta.lowest(Length)
hiLimit = highestC[1] - avgTR[1] * Multiplier
loLimit = lowestC[1] + avgTR[1] * Multiplier
ret = 0.0
poz = 0.0
iff_1 = close < loLimit and close < hiLimit ? loLimit : nz(ret[1], close)
ret := close > hiLimit and close > loLimit ? hiLimit : iff_1
iff_2 = close < ret ? -1 : nz(poz[1], 0)
poz := close > ret ? 1 : iff_2
ret
TTS = tts(Length, Multiplier)
//barcolor(poz == -1 ? color.red : poz == 1 ? color.green : color.blue)
plot(TTS, color=color.new(color.blue, 0), title='Trend Trader Line')
// MA
ribbon_grp = "MA"
ma(source, length, type) =>
type == "SMA" ? ta.sma(source, length) :
type == "EMA" ? ta.ema(source, length) :
type == "SMMA (RMA)" ? ta.rma(source, length) :
type == "WMA" ? ta.wma(source, length) :
type == "VWMA" ? ta.vwma(source, length) :
na
ma1_type = input.string("EMA" , "MA" , inline="MA #1", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group=ribbon_grp)
ma1_source = input.source(close , "" , inline="MA #1", group=ribbon_grp)
ma1_length = input.int (200 , "" , inline="MA #1", minval=1, group=ribbon_grp)
ma1 = ma(ma1_source, ma1_length, ma1_type)
plot(ma1, color = color.white, title="MA")
// STC
EEEEEE = input(12, 'Length', group='STC')
BBBB = input(26, 'FastLength', group='STC')
BBBBB = input(50, 'SlowLength', group='STC')
max_stc_change = input(7, title="Max STC Slope Change")
min_stc_bars = input(2, title='Min STC Squeeze')
AAAA(BBB, BBBB, BBBBB) =>
fastMA = ta.ema(BBB, BBBB)
slowMA = ta.ema(BBB, BBBBB)
AAAA = fastMA - slowMA
AAAA
AAAAA(EEEEEE, BBBB, BBBBB) =>
AAA = input(0.5)
var CCCCC = 0.0
var DDD = 0.0
var DDDDDD = 0.0
var EEEEE = 0.0
BBBBBB = AAAA(close, BBBB, BBBBB)
CCC = ta.lowest(BBBBBB, EEEEEE)
CCCC = ta.highest(BBBBBB, EEEEEE) - CCC
CCCCC := CCCC > 0 ? (BBBBBB - CCC) / CCCC * 100 : nz(CCCCC[1])
DDD := na(DDD[1]) ? CCCCC : DDD[1] + AAA * (CCCCC - DDD[1])
DDDD = ta.lowest(DDD, EEEEEE)
DDDDD = ta.highest(DDD, EEEEEE) - DDDD
DDDDDD := DDDDD > 0 ? (DDD - DDDD) / DDDDD * 100 : nz(DDDDDD[1])
EEEEE := na(EEEEE[1]) ? DDDDDD : EEEEE[1] + AAA * (DDDDDD - EEEEE[1])
EEEEE
stc = AAAAA(EEEEEE, BBBB, BBBBB)
mColor = stc > stc[1] ? color.new(color.green, 20) : color.new(color.red, 20)
//plot(stc, color=mColor, title='STC', linewidth=2)
check_all_prev(formula, length) =>
check = false
for i=0 to length-1
check := check or formula[i]
check
stc_change = math.abs(stc-stc[1])
// Trading Session
session = input.session("0000-0000", title="Trading Session (Exchange Timezone)")+":1234567"
t = time(timeframe.period, session)
trading_session_filter = na(t) ? 0 : 1
long = close>TTS and TTS>ma1 and stc>stc[1] and stc[1]<stc[2] and stc[1]<1 and stc_change<=max_stc_change and check_all_prev(stc[1]<1 , min_stc_bars)[1] and trading_session_filter
short = close<TTS and TTS<ma1 and stc<stc[1] and stc[1]>stc[2] and stc[1]>99 and stc_change<=max_stc_change and check_all_prev(stc[1]>99, min_stc_bars)[1] and trading_session_filter
// Position Management Tools
pos = 0.0
pos:= long? 1 : short? -1 : pos[1]
longCond = long and (pos[1]!= 1 or na(pos[1]))
shortCond = short and (pos[1]!=-1 or na(pos[1]))
// EXIT FUNCTIONS //
i_sl = input.float(80.0, title="Stop Loss (Ticks)", minval=0)
i_tp = input.float(80.0, title="Take Profit (Ticks)", minval=0)
i_tsl = input.float(40.0, title="Trailing Stop Loss (Ticks)", minval=0)
i_tsltp = input.float(40.0, title="Trailing SL Trigger" , minval=0, step=0.1)
sl = i_sl >0? i_sl *syminfo.mintick : 99999
tp = i_tp >0? i_tp *syminfo.mintick : 99999
tsl = i_tsl>0? i_tsl*syminfo.mintick : 99999
long_entry = ta.valuewhen(longCond , close, 0)
short_entry = ta.valuewhen(shortCond, close, 0)
// Inprofit
be_long = ta.valuewhen(longCond , close + i_tsltp*syminfo.mintick, 0)
be_short = ta.valuewhen(shortCond, close - i_tsltp*syminfo.mintick, 0)
inprofit_long = 0
inprofit_short = 0
inprofit_long := pos==0 or longCond ? 0 : high>be_long [1]? 1 : inprofit_long[1]
inprofit_short := pos==0 or shortCond? 0 : low <be_short[1]? 1 : inprofit_short[1]
// Trailing Stop Loss
trail_long = 0.0, trail_short = 0.0
trail_long := longCond? high : high>trail_long[1]? high : pos<1 ? 0 : trail_long[1]
trail_short := shortCond? low : low<trail_short[1]? low : pos>-1 ? 99999 : trail_short[1]
trail_long_final = inprofit_long ? trail_long -tsl : 0
trail_short_final = inprofit_short ? trail_short +tsl : 99999
// Simple Stop Loss + 2 Take Profits
sl_long0 = long_entry - sl
sl_short0 = short_entry + sl
tp_long = long_entry + tp
tp_short = short_entry - tp
sl_long = math.max(sl_long0, trail_long_final)
sl_short = math.min(sl_short0, trail_short_final)
sl_long_entry = ta.valuewhen(longCond , sl_long , 0)
sl_short_entry = ta.valuewhen(shortCond, sl_short, 0)
// Position Adjustment
long_sl = low <sl_long[1] and pos[1]==1
short_sl = high>sl_short[1] and pos[1]==-1
final_long_tp = high>tp_long[1] and pos[1]==1
final_short_tp = low <tp_short[1] and pos[1]==-1
if ((long_sl or final_long_tp) and not shortCond) or ((short_sl or final_short_tp) and not longCond)
pos:=0
// Strategy Backtest Limiting Algorithm
i_startTime = input.time(defval = timestamp("01 Sep 2002 13:30 +0000"), title = "Backtesting Start Time")
i_endTime = input.time(defval = timestamp("30 Sep 2099 19:30 +0000"), title = "Backtesting End Time" )
timeCond = (time > i_startTime) and (time < i_endTime)
// RISK
risk_perc = input(1.0, title="Risk Percentage")/100
SL_valueL = ta.valuewhen(longCond , math.abs(close-sl_long ), 0)
SL_valueS = ta.valuewhen(shortCond, math.abs(close-sl_short), 0)
dollar_risk = (strategy.initial_capital + strategy.netprofit) * risk_perc
QTY_L = dollar_risk / SL_valueL
QTY_S = dollar_risk / SL_valueS
equity = strategy.initial_capital + strategy.netprofit
if equity>0 and timeCond
if longCond
strategy.entry("long" , strategy.long , qty=QTY_L)
if shortCond
strategy.entry("short", strategy.short, qty=QTY_S)
strategy.exit("SL/TP", from_entry = "long" , stop=sl_long , limit=tp_long )
strategy.exit("SL/TP", from_entry = "short", stop=sl_short, limit=tp_short)
show_sltp = input(true, title="Show SL/TP Lines on Chart")
xtl=plot(show_sltp and pos== 1? tp_long : na, color=color.green, style=plot.style_linebr, title="TP Long ")
xts=plot(show_sltp and pos==-1? tp_short : na, color=color.green, style=plot.style_linebr, title="TP Short")
xsl=plot(show_sltp and pos== 1? sl_long_entry : na, color=color.red , style=plot.style_linebr, title="SL Long ")
xss=plot(show_sltp and pos==-1? sl_short_entry : na, color=color.red , style=plot.style_linebr, title="SL Short")
xel=plot(show_sltp and pos== 1?long_entry : na, color=color.blue , style=plot.style_linebr, title="E Long ")
xes=plot(show_sltp and pos==-1?short_entry: na, color=color.blue , style=plot.style_linebr, title="E Short")
fill(xel, xtl, color=color.new(color.green, 80))
fill(xel, xsl, color=color.new(color.red , 80))
fill(xes, xts, color=color.new(color.green, 80))
fill(xes, xss, color=color.new(color.red , 80))
plot(show_sltp and pos== 1 and i_tsl>0? sl_long : na, color=color.red , style=plot.style_linebr, title="Trailing SL Long ")
plot(show_sltp and pos==-1 and i_tsl>0? sl_short : na, color=color.red , style=plot.style_linebr, title="Trailing SL Short")
alerts = input.string("PineConnector", title="Alerts Messages:", options=['PineConnector', 'Custom'], group='ALERT SELECTOR')
pc_id = input.string(title="License ID", defval="1236518421235", group='PineConnector Settings', tooltip="This is your PineConnector license ID")
pc_prefix = input.string(title="MetaTrader Prefix", defval="", group='PineConnector Settings', tooltip="This is your broker's MetaTrader symbol prefix")
pc_suffix = input.string(title="MetaTrader Suffix", defval="", group='PineConnector Settings', tooltip="This is your broker's MetaTrader symbol suffix")
pc_risk = input.float(minval=0, maxval=100, step=1, defval=1, group='PineConnector Settings', title="Risk %", tooltip="This is how much to risk per trade in Meta Trader")
var symbol = pc_prefix + syminfo.ticker + pc_suffix
pc_entry_alert(direction) =>
pc_id + "," + direction + "," + symbol + "," + "sl=" + str.tostring(i_sl/10, '#') + ",tp=" + str.tostring(i_tp/10, '#') + ',trailtrig=' + str.tostring(i_tsltp/10, '#') + ',traildist=' + str.tostring(i_tsl/10, '#') + ',trailstep=' + str.tostring(1) + ",risk=" + str.tostring(pc_risk)
if alerts=='PineConnector'
if longCond
alert(pc_entry_alert('buy'), alert.freq_once_per_bar_close)
if shortCond
alert(pc_entry_alert('sell'), alert.freq_once_per_bar_close)
longCond_txt = input("", title='Custom Alert Msg: LONG Entry' , group='Custom Alert Messages', inline='longCond_txt ')
shortCond_txt = input("", title='Custom Alert Msg: SHORT Entry', group='Custom Alert Messages', inline='shortCond_txt ')
if alerts=='Custom'
if longCond
alert(longCond_txt, alert.freq_once_per_bar_close)
if shortCond
alert(shortCond_txt, alert.freq_once_per_bar_close)
Responded
1
Rating
Projects
280
65%
Arbitration
6
17%
/
33%
Overdue
10
4%
Working
Similar orders
Mt4/mt5
30 - 100 USD
i need a remote trade copier over internet for mt4 and mt5, i need the open source, its ok also from stratch or if you have someone available please share some screen or other about it
THERE ARE FEW MODIFICATION IN PARAMETER LIKE ORDER PLACEING, ORDER CREAT AFTER STOP LOSS HITTING,STOP LOSS TRAILING AND EXIT FROM THE TRADE. FEW OPTION WILL BE DELETED FROM THE FILE ATTACHED. REST ALL IS SAME
Request for Development: Scalping Robot in MQL5
30 - 100 USD
I am seeking to develop a small scalping robot in MQL5 that utilizes the "Trend Catcher with Alert" indicator. This indicator provides entry and exit signals, which I would like the robot to follow. Key Requirements: Entry Signals : The robot should enter a trade based on the signals generated by the Trend Catcher indicator. Exit Signals : The robot should exit trades according to the indicator's exit signals
Counter ea
30+ USD
MULTISTRATEGIST EA I have a problem with my ea that the account always blows up before the price has a chance to arrive so I want a program that will counter the trades the expert makes by identifying the magic numbers There is also a need for the functions of SL delay and taking Perciel and I can control how many of the commands I want to take like Perciel 40% or maybe 80% and follow the rest and maybe not take
I have list of free indicators in tradingview and i would like to convert them into an mt4 ea, But the EA will have and work based on the indicators features The list of the are listed as follows :> 1. Market Structure Break And Order block. By EmreKb 2. Rainbow Adaptive RSI by LuxAlgo 3. Multiple MA (21,50,100) 4. SuperTrend My budget for this 80$ max
I want a programmer to create me a trading robot that can open an close trades that works from a 5m time frame to daily time frame that trades all currencies an it should work in all brokers. The bot should trade the minimum amount of $10 an more it should trade both MT4 an MT5
I need an expert Ninjatrader8 developer
50 - 70 USD
Hello there!! I need a professional ninjatrader developer who can code my specifications to an EA .kindly bid and all the necessary informations will be sent via chat box..Thank you
The EA should have the input of both indicators for i will be putting my own settings Buy/sell order conditions to be met before an order is executed 1. BUY ORDERS; a weak/strong low signal appears (from smart money concept indicator) and must be touching/sitting on a previous buy order block which is constant or doesn't disappear/vanish and the other indicator Bheurekso must have given an arrow signal of opposite
Trade Copier from MT4 to MT5
30 - 100 USD
I want to develop a trade copier that copies trades from master account to client and also from client account to master account. It should be working on computer or VPS
Wirtschaftskalender
50 - 200 USD
1) Einbinden des Wirtschaftskalender ( https://www.mql5.com/de/economic-calendar ) 2) Unterschiedliche Gewichtung der Ereignisse erkennen (Farbe rot/orange/grau) 3) Je nach Gewichtung unterschiedliche Wartezeiten vor und nach dem Ereigniss Der Sourcecode muss dokumentiert sein. Die Bezahlung des vereinbarten Betrages läuft in 33% Schritten ab. 33% bei Vergabe 33% bei Endabnahme (Version 1.0) 33% nach Abgabe des
Project information
Budget
60+ USD
For the developer
54
USD
Deadline
to 2 day(s)