
اس حکمت عملی کو یومیہ لکیری اختتامی قیمت کا موازنہ حکمت عملی کہا جاتا ہے۔ یہ ایک مقداری حکمت عملی ہے جس کی بنیاد پر یومیہ لکیری اختتامی قیمت پر تجارت کے فیصلے کیے جاتے ہیں۔ یہ حکمت عملی موجودہ یومیہ لکیری اختتامی قیمت اور پچھلے دن کی لکیری اختتامی قیمت کے فرق کی گنتی کے ذریعہ تجارت کا اشارہ پیدا کرتی ہے۔ جب فرق کی قیمت مقررہ حد سے زیادہ ہو تو ، خریدنے یا بیچنے کا عمل انجام دیا جاتا ہے۔
اس حکمت عملی کا بنیادی منطق موجودہ K لائن کی اختتامی قیمت اور پچھلی K لائن کی اختتامی قیمت کا موازنہ کرنا ہے۔ خاص طور پر:
اس حکمت عملی میں کوئی اسٹاپ اور اسٹاپ کی شرائط نہیں ہیں ، اور اس میں ٹریڈنگ سگنل پر انحصار کیا گیا ہے جس کی وجہ سے قیمتوں میں کمی کی شرائط پیدا ہوتی ہیں۔
اس حکمت عملی میں لین دین کی قیمتوں کا موازنہ کرکے ٹریڈنگ سگنل تشکیل دیا جاتا ہے۔ یہ حکمت عملی آسان ہے اور ابتدائی سیکھنے کے لئے موزوں ہے۔ تاہم ، اس حکمت عملی میں کچھ خطرہ ہے اور اسے حقیقی دکانوں کی تجارت کے لئے مزید اصلاح کی ضرورت ہے۔
/*backtest
start: 2022-11-14 00:00:00
end: 2023-11-20 00:00:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
strategy("Daily Close Comparison Strategy (by ChartArt) correct results", shorttitle="CA_-_Daily_Close_Strat", overlay=false)
// ChartArt's Daily Close Comparison Strategy
//
// Version 1.0
// Idea by ChartArt on February 28, 2016.
//
// This strategy is equal to the very
// popular "ANN Strategy" coded by sirolf2009,
// but without the Artificial Neural Network (ANN).
//
// Main difference besides stripping out the ANN
// is that I use close prices instead of OHLC4 prices.
// And the default threshold is set to 0 instead of 0.0014
// with a step of 0.001 instead of 0.0001.
//
// This strategy goes long if the close of the current day
// is larger than the close price of the last day.
// If the inverse logic is true, the strategy
// goes short (last close larger current close).
//
// This simple strategy does not have any
// stop loss or take profit money management logic.
//
// List of my work:
// https://www.tradingview.com/u/ChartArt/
//
// __ __ ___ __ ___
// / ` |__| /\ |__) | /\ |__) |
// \__, | | /~~\ | \ | /~~\ | \ |
//
//
threshold = input(title="Price Difference Threshold correct results", type=float, defval=0, step=0.004)
getDiff() =>
yesterday=request.security(syminfo.tickerid, 'D', close[1])
today=close
delta=today-yesterday
percentage=delta/yesterday
closeDiff = getDiff()
buying = closeDiff > threshold ? true : closeDiff < -threshold ? false : buying[1]
hline(0, title="zero line")
bgcolor(buying ? green : red, transp=25)
plot(closeDiff, color=silver, style=area, transp=75)
plot(closeDiff, color=aqua, title="prediction")
longCondition = buying
if (longCondition)
strategy.entry("Long", strategy.long)
shortCondition = buying != true
if (shortCondition)
strategy.entry("Short", strategy.short)