// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/// © Dev Lucem//@version=5import DevLucem/ZigLib/1 as ZigZagindicator('ZigZag++ Lines Only [LD]', overlay=true, max_lines_count=50)// الإعدادات الأساسيةDepth = input.int(12, 'Depth', minval=1, step=1)Deviation = input.int(5, 'Deviation', minval=1, step=1)Backstep = input.int(2, 'Backstep', minval=2, step=1)line_thick = input.int(2, 'Line Thickness', minval=1, maxval=4)upcolor = input(color.lime, 'Bull Color')dncolor = input(color.red, 'Bear Color')lines = input(0, "Lines Transparency")repaint = input(true, 'Repaint Levels')extend = input(false, "Extend ZigZag")// حساب نقاط ZigZag[direction, z1, z2] = ZigZag.zigzag(low, high, Depth, Deviation, Backstep)var float lastPoint = z1.price[1]if bool(ta.change(direction)) lastPoint := z1.price[1]// رسم الخطوط فقط بدون أي لابلز أو خلفيات أو تنبيهاتline zz = naif repaint zz := line.new(z1, z2, xloc.bar_time, extend ? extend.right : extend.none, color.new(direction > 0 ? upcolor : dncolor, lines), width = line_thick) if direction == direction[1] line.delete(zz[1]) else line.set_extend(zz[1], extend.none)else if direction != direction[1] zz := line.new(z1[1], z2[1], xloc.bar_time, extend.none, color.new(direction > 0 ? upcolor : dncolor,طيب عايزك تضيف عليها اشارات شراء فقط الشروط اولا تكون خطين احمرواخضر الاحمر يتكون الاول لازم الحط الاحمر طول مره ونص علي الاقل للخط الاخضر وبعد كدا هيظهر خط احمر واخضر سيبك من الاحمر وركز مع الاخضر اول ما يخترف الخط الاخضر الي فات بنسبة 10% اظهر الااشاره lines), width = line_thick)
I can see you have a ZigZag indicator in Pine Script and want to add buy signals based on specific conditions. The image shows the Mozilla Public License page which matches the license header in your code.
Based on your requirements, here's the modified Pine Script code with buy signals:
zigzag_buy_signals.pine
فهمت! تريد تغيير الشروط. إليك الكود المحدث:
zigzag_buy_signals_v2.pine
تسلسل الخطوط:
شرط الإشارة:
المساعدات البصرية:
إعادة التعيين:
الآن المؤشر سيبحث عن التسلسل المطلوب ويظهر إشارة الشراء فقط عندما تغلق شمعتان فوق قمة الخط الأخضر الأول.
لا التسلسل خط احمر خط اخضر الخط الاحمر ده يكون اكبر من خط الاخضر مره ونص اقل حاجه بعد كده هيجي خط احمر سيبك منه بعديه خط اخضر خلال تكون الخط الاخضر ده لو في شمعتين قفلوا فوق كلمه الخط الاخضر اللي فات اظهر الاشاره ومش شرط الشمعتين دول يكونوا ورا بعض بس يكونوا ضمن الخط الاخضر ولو ظهر بعد كده خط احمر قبل ما شمعتين تقفل فوق قمه الخط الاخضر الغي الاشاره ديت ويبدا ابحث من الاول