Category Other  Published on 15/02/2023

3 line Strike P2

Description

This is the other half of the strategy that adds signals for the 3 bars and engulfing Candle

Rules for this are as follows

1. Trade with the trend, dont try to force a trade in consolidation zones.

     1H Find support and resistance levels 2 above and 2 below

and Check for RSI Divergence.

     15m use Welles Wilder Smoothing MA's 21 50 200, Check for RSI Divergence.

     5m and the same MA's here But all 3 must be in order of trend, Check for RSI Divergence.

2. Only look for Signals that go with the trend. Wait for the Candle to close.

3. RSI Must also be on the trend side of the 50 (DO NOT USE the 30 and 70)

4. RR should be set past previous High/Low and TP at 2 to 1.

There is more to this stratety but these are the basics that should be tested on a demo to understand how it works.

Yes I have taken some code from another creator and modified it to work better , I'm sure that this is somewhat ok ?? , I think it was called InsideBars.

 

note.... hold      Windows+Shift+S      and take a shot of these rules to print them or what ever....

 


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class BACStrike : Indicator
    {
        [Parameter(DefaultValue = "Big Ass Candles")]
        public string Message { get; set; }
    
        
        public IndicatorDataSeries PatternData { get; set; }

        private const VerticalAlignment vAlign = VerticalAlignment.Center;
        private const HorizontalAlignment hAlign = HorizontalAlignment.Center;

        private const string UpArrow = "▲";
        private const string DownArrow = "▼";

        private double offset;

        private enum PatternType : int { Bull = 1, Bear = 0, }

        protected override void Initialize() { PatternData = CreateDataSeries(); offset = Symbol.PipSize; }
        
        private void DrawSymbol(int index, PatternType type) {
        
            var high = Bars.HighPrices[index];
            var low = Bars.LowPrices[index];
 
            double bear_y = new double();
            double bull_y = new double();
        
            if (TimeFrame == TimeFrame.Minute)
            {
                bear_y = high + offset * 7;
                bull_y = low - offset * 7;
            }
            
 
            if (TimeFrame == TimeFrame.Minute5)
            {
                bear_y = high + offset * 8;
                bull_y = low - offset * 8;
            }
            
            if (TimeFrame == TimeFrame.Minute15) {
                bear_y = high + offset * 15;
                bull_y = low - offset * 15;
            }
 
            if (TimeFrame == TimeFrame.Hour) {
                bear_y = high  + offset * 30;
                bull_y = low - offset * 30;
            }

            int x = index;

            string f_ObjName = string.Format("Engulfing {0}", index);

            if (type is PatternType.Bull)
            {
            
                ChartObjects.DrawText(f_ObjName, UpArrow, x, bull_y, vAlign, hAlign, Colors.LimeGreen);
                
            }
            else if (type is PatternType.Bear)
            {
            
                ChartObjects.DrawText(f_ObjName, DownArrow, x, bear_y, vAlign, hAlign, Colors.OrangeRed);
                
            }
        }

        public override void Calculate(int index)
        {
            var MCO1 = Bars.OpenPrices.Last(1);
            var MCC1 = Bars.ClosePrices.Last(1);
            
            var MCO2 = Bars.OpenPrices.Last(2);
            var MCC2 = Bars.ClosePrices.Last(2);
            
            var MCO3 = Bars.OpenPrices.Last(3);
            var MCC3 = Bars.ClosePrices.Last(3);

            var CCO = Bars.OpenPrices.Last(0);
            var CCC = Bars.ClosePrices.Last(0);
            
            // Drawing chart objects
    
            if ((MCO3 > MCC3) && (MCO2 > MCC2) && (MCO1 > MCC1) && (CCO < CCC) && (CCC >= MCO1))
            {            
                DrawSymbol(index, PatternType.Bull);
                
                
            }
            else if ((MCO3 < MCC3) && (MCO2 < MCC2) && (MCO1 < MCC1) && (CCO > CCC) && (CCC <= MCO1)) 
            {            
                DrawSymbol(index, PatternType.Bear);
                
                
            }
        }
    }
}


VE
VEI5S6C4OUNT0

Joined on 06.12.2022

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: BACStrike.algo
  • Rating: 5
  • Installs: 806
Comments
Log in to add a comment.
SP
spearira · 1 year ago

Re: snake game

I've been watching since part 1

VE
VEI5S6C4OUNT0 · 1 year ago

Please go to his channel to learn more about how this works

https://www.youtube.com/@TheMovingAverage/videos

I'm not realy that good at coding but this seams to be as close to what he uses on TradingView

if anyone could help update this it would be AWESOME.