Thursday, April 26, 2018

Ricky Training notes

Golden ratio reward 5% to  loss 1%

momentum scanner

price 1-30
vol min 300,000
study
pre-market open 3% greater than 5 bars ago (30 min chart)

study
RSI_Scan length 14 and a WILDERS  average tpe is less than 50

TD scanner to see potential trades

support and resistence
break blue line(EMA), 2nd comfirmation, then moving up
EMA holding, if break downward trend, EMA set at 9-15
two candle confirmation (up or down)

SMA

VWAP (day trade) bounce at golden line, middle line resistance (sell when break)

MACD 12,26,9, Ex, yes

RSI 14,70,30,close, wilders, no

Focus on one or two stocks


basic script

using System;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;
using Community;

namespace Channels
{
    class StrategyBasic : WealthScript
    {
        //Strategy Parameters - GLobal
        StrategyParameter _periodFast;
        StrategyParameter _periodSlow;

        //Strategy Parameters - Constructor
        public StrategyBasic()
        {
            _periodFast = CreateParameter("Period Fast", 15, 0, 100, 1);
            _periodSlow = CreateParameter("Period SLow", 180, 0, 100, 1);
        }

        //Strategy Variables
        bool enterLong;
        bool enterShort;
        bool exitLong;
        bool exitShort;
        bool abovePricePane;
        bool displayGrid;

        //The Main Method
        protected override void Execute()
        {
            //Technical Settings
            ClearDebug();
            int firstValidValue = 0;

            //Bringing in the Parameters
            int periodFast = _periodFast.ValueInt;
            int periodSlow = _periodSlow.ValueInt;

            abovePricePane = false;
            displayGrid = true;

            DataSeries macd = MACD.Series(Close);
            PlotSeries(pane2, m                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
            // Create a pane
            ChartPane myCustomPane1 = CreatePane(40, abovePricePane, displayGrid);
            DrawLabel(myCustomPane1, "myCustomPane1", Color.Black);


            //Indicators
            #region Indicators

            DataSeries vwap = Community.Indicators.VWAP.Series(Bars);
            PlotSeries(PricePane, vwap, Color.Purple, LineStyle.Solid, 2);
            DataSeries emaFast = EMA.Series(Close, periodFast, EMACalculation.Modern);
            firstValidValue = Math.Max(firstValidValue, periodFast * 3);
            PlotSeries(PricePane, emaFast, Color.Blue, LineStyle.Solid, 2);

            DataSeries smaSlow = SMA.Series(Close, periodSlow);
            //DataSeries emaSlow = EMA.Series(Close, periodSlow, EMACalculation.Modern);
            firstValidValue = Math.Max(firstValidValue, periodSlow * 3);
            PlotSeries(PricePane, smaSlow, Color.Green, LineStyle.Solid, 2);

            #endregion

            for (int bar = firstValidValue; bar < Bars.Count; bar++)
            {
                //the rules
                enterLong = CrossOver(bar, emaFast, smaSlow);
                enterShort = CrossUnder(bar, emaFast, smaSlow);

                exitLong = Bars.Close[bar] < emaFast[bar];
                exitShort = Bars.Close[bar] > emaFast[bar];

                //if we have a position
                if (ActivePositions.Count > 0)
                {
                    //if the open position is LONG
                    if (LastActivePosition.PositionType == PositionType.Long)
                    {
                        if (exitLong)
                        {
                            ExitAtMarket(bar + 1, LastActivePosition, "Long Stop");
                        }
                    }

                    //if the open position is SHORT
                    else if (LastActivePosition.PositionType == PositionType.Short)
                    {
                        if (exitShort)
                        {
                            ExitAtMarket(bar + 1, LastActivePosition, "Short Stop");
                        }
                    }
                }

                //if we don't have the position
                else if (ActivePositions.Count == 0)
                {
                    if (enterLong)
                    {
                        BuyAtMarket(bar + 1, "Long");
                    }
                    if (enterShort)
                    {
                        ShortAtMarket(bar + 1, "Short");
                    }
                }
            }

        }
    }
}

Monday, April 23, 2018

When download indicators from Wkii, you need to change to your newest frame work to make it compile through, after compile, copy DLL to the Wealth lab folder and need to restart Wealth Lab to get new indicators shown.

Friday, April 20, 2018

simply safe dividends

https://www.simplysafedividends.com/timeliness/

https://www.simplysafedividends.com/when-should-i-sell-my-stocks/

Saturday, April 7, 2018

Think or swim trend line tool


This is from Ricky  Gutierrez
, just for my note taking purpose


Think or Swim settings


After changes, click on Setup on the top right corner and select "Save Workspace as"

Change Volume to show color:
go to style > settings > appearance > for volume select "show color as ticks"