
ایلیگیٹر طویل مدتی رجحانات کی پیروی کرنے والی تجارتی حکمت عملی ایک مقداری تجارتی حکمت عملی ہے جو ولیمز ایلیگیٹر اشارے پر مبنی ہے۔ یہ حکمت عملی مارکیٹ میں اہم رجحانات کو پکڑنے کے لئے مختلف ادوار کی متحرک اوسط کا ایک مجموعہ استعمال کرتی ہے ، جو درمیانی اور طویل مدتی رجحانات کی پیروی کرنے والی تجارت کے لئے موزوں ہے۔ حکمت عملی کا بنیادی نظریہ یہ ہے کہ رجحانات کی سمت اور طاقت کا فیصلہ کرنے کے لئے ایلیگیٹر اشارے کے کھلنے کی سمت اور قیمت کی ایلیگیٹر اشارے کے مقابلے میں اس کی پوزیشن کے ذریعہ فیصلہ کیا جائے۔
Alligator کی طویل مدتی رجحان ٹریڈنگ حکمت عملی Alligator اشارے کی تعمیر کے لئے تین مختلف ادوار کی متحرک اوسط کا استعمال کرتی ہے:
جب Alligator اشارے کی کھلنے کی سمت اوپر کی طرف ہوتی ہے یعنی Jaw لائن سب سے نیچے، Teeth لائن وسط میں اور Lips لائن سب سے اوپر ہوتی ہے اور قیمت Alligator اشارے سے اوپر ہوتی ہے تو حکمت عملی زیادہ پوزیشن کھلاتی ہے۔ اس صورت میں اشارہ ہوتا ہے کہ ایک اوپر کی طرف رجحان کی لہر کی تصدیق ہوچکی ہے اور ہم اس پوزیشن کو رجحان کے اختتام تک رکھنا چاہتے ہیں۔
جب قیمت Jaw لائن سے نیچے گرتی ہے تو ، حکمت عملی زیادہ بولیوں کو ختم کردیتی ہے۔ اس سے یہ یقینی بنایا جاسکتا ہے کہ ہم ریچھ کی مارکیٹ میں اپنی پوزیشن برقرار نہیں رکھیں گے۔
ایلیگیٹر طویل مدتی رجحان ٹریڈنگ حکمت عملی ایک سادہ ، آسان استعمال ، اور وسیع پیمانے پر قابل اطلاق مقدار کی تجارت کی حکمت عملی ہے۔ مارکیٹ کے اہم رجحانات کو پکڑنے کے لئے ایلیگیٹر اشارے کا استعمال کرتے ہوئے ، یہ حکمت عملی درمیانی اور طویل مدتی میں مستحکم منافع حاصل کرسکتی ہے۔ اگرچہ اس حکمت عملی میں کچھ ممکنہ خطرات موجود ہیں ، لیکن اس حکمت عملی کی کارکردگی اور استحکام کو مزید بہتر بنانے کے لئے اس میں رسک مینجمنٹ ماڈیول ، دیگر تکنیکی اشارے کے ساتھ مل کر ، اور پیرامیٹرز کی ترتیب کو بہتر بنانے جیسے طریقوں کو شامل کیا جاسکتا ہے۔ طویل مدتی رجحان ٹریڈنگ حکمت عملی ایک قابل غور انتخاب ہے ان سرمایہ کاروں کے لئے جو درمیانی اور طویل مدتی رجحان ٹریڈنگ کو ترجیح دیتے ہیں۔
/*backtest
start: 2023-05-11 00:00:00
end: 2024-05-16 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//_______ <licence>
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Skyrex
//_______ <version>
//@version=5
//_______ <declaration_statement>
strategy(title = "Alligator Long Term Trend Following Strategy [Skyrex.io]",
shorttitle = "Alligator Strategy [Skyrex.io]",
overlay = true,
format = format.inherit,
pyramiding = 1,
calc_on_order_fills = false,
calc_on_every_tick = true,
default_qty_type = strategy.percent_of_equity,
default_qty_value = 100,
initial_capital = 10000,
currency = currency.NONE,
commission_type = strategy.commission.percent,
commission_value = 0.1,
slippage = 5)
//_______ <constant_declarations>
var color skyrexGreen = color.new(#2ECD99, 0)
var color skyrexGray = color.new(#F2F2F2, 0)
var color skyrexWhite = color.new(#FFFFFF, 0)
var color barcolor = na
//_______ <inputs>
// Trading bot settings
sourceUuid = input.string(title = "sourceUuid:", defval = "yourBotSourceUuid", group = "Trading Bot Settings")
secretToken = input.string(title = "secretToken:", defval = "yourBotSecretToken", group = "Trading Bot Settings")
// Trading Period Settings
lookBackPeriodStart = input(title = "Trade Start Date/Time", defval = timestamp('2023-01-01T00:00:00'), group = "Trading Period Settings")
lookBackPeriodStop = input(title = "Trade Stop Date/Time", defval = timestamp('2025-01-01T00:00:00'), group = "Trading Period Settings")
//_______ <function_declarations>
//@function Used to calculate Simple moving average for Alligator
//@param src Sourse for smma Calculations
//@param length Number of bars to calculate smma
//@returns The calculated smma value
smma(src, length) =>
smma = 0.0
smma := na(smma[1]) ? ta.sma(src, length) : (smma[1] * (length - 1) + src) / length
smma
//@function Used to decide if current candle above the Alligator
//@param jaw Jaw line of an Alligator
//@param teeth Teeth line of an Alligator
//@param lips Lips line of an Alligator
//@returns Bool value
is_LowAboveAlligator(jaw, teeth, lips) =>
result = low > jaw and low > lips and low > teeth
result
//@function Used to decide if current candle below the Alligator
//@param jaw Jaw line of an Alligator
//@param teeth Teeth line of an Alligator
//@param lips Lips line of an Alligator
//@returns Bool value
is_HighBelowAlligator(jaw, teeth, lips) =>
result = high < jaw and high < lips and high < teeth
result
//@function Used to decide if Alligator's mouth is open
//@param jaw Jaw line of an Alligator
//@param teeth Teeth line of an Alligator
//@param lips Lips line of an Alligator
//@returns Bool value
is_AlligatorHungry(jaw, teeth, lips) =>
result = lips > jaw[5] and lips > teeth[2] and teeth > jaw[3]
result
//_______ <calculations>
jaw = smma(hl2, 13)[8]
teeth = smma(hl2, 8)[5]
lips = smma(hl2, 5)[3]
jaw_o = smma(hl2, 13)
teeth_o = smma(hl2, 8)
lips_o = smma(hl2, 5)
//_______ <strategy_calls>
longCondition = is_LowAboveAlligator(jaw, teeth, lips) and is_AlligatorHungry(jaw_o, teeth_o, lips_o)
if (longCondition)
strategy.entry(id = "entry1", direction = strategy.long, alert_message = '{\n"base": "' + syminfo.basecurrency + '",\n"quote": "' + syminfo.currency + '",\n"position": "entry1",\n"price": "' + str.tostring(close) + '",\n"sourceUuid": "' + sourceUuid + '",\n"secretToken": "' + secretToken + '",\n"timestamp": "' + str.tostring(timenow) + '"\n}')
if close < jaw
strategy.close(id = "entry1", alert_message = '{\n"base": "' + syminfo.basecurrency + '",\n"quote": "' + syminfo.currency + '",\n"position": "close",\n"price": "' + str.tostring(close) + '",\n"sourceUuid": "' + sourceUuid + '",\n"secretToken": "' + secretToken + '",\n"timestamp": "' + str.tostring(timenow) + '"\n}')
//_______ <visuals>
if strategy.opentrades > 0
barcolor := skyrexGreen
else
barcolor := skyrexGray
barcolor(barcolor)
//_______ <alerts>