Skip to main content
  1. Tech/

Wealth Lab Pro Earning Play Screener

·1 min

This is a quick script that I use to find options to buy or sell.

 using  System;
 using  System.Collections.Generic;
 using  System.Text;
 using  System.Drawing;
 using  WealthLab;
 using  WealthLab.Indicators;
 using  Community.Components;

 namespace  WealthLab.Strategies
{
	 public class  MyStrategy  : WealthScript
	{

		 protected override void  Execute()
		{
			DataSeries maFast = EMAModern.Series(Close,  50 );
			DataSeries maSlow = EMAModern.Series(Close,  200 );
			DataSeries maFast_1 = EMAModern.Series(Close,  10 );
			DataSeries maSlow_2 = EMAModern.Series(Close,  50 );
			DataSeries ma = EMAModern.Series(Close,  10 );
			DataSeries maFast_3 = EMAModern.Series(Close,  10 );
			DataSeries maSlow_4 = EMAModern.Series(Close,  50 );

			PlotSeries(PricePane,EMAModern.Series(Close, 50 ),Color.Red,LineStyle.Solid, 2 );
			PlotSeries(PricePane,EMAModern.Series(Close, 200 ),Color.Green,LineStyle.Solid, 2 );
			PlotSeries(PricePane,EMAModern.Series(Close, 10 ),Color.Blue,LineStyle.Solid, 2 );
			PlotSeries(PricePane,EMAModern.Series(Close, 50 ),Color.Red,LineStyle.Solid, 2 );
			PlotSeries(PricePane,EMAModern.Series(Close, 10 ),Color.Blue,LineStyle.Solid, 2 );

			//for(int bar = GetTradingLoopStartBar(201); bar < Bars.Count; bar++)
 			 int  bar = Bars.Count -  1 ;
			{
				 if  (IsLastPositionActive)
				{
					Position p = LastPosition;
					 if  (p.EntrySignal.Contains("Group1|" ))
					{
						 if  (CrossUnder(bar, maFast_3, maSlow_4))
						{
							SellAtMarket(bar +  1 , p, "Group1" );
						}
					}

				}
				 else
				{
					 if  (maFast[bar] > maSlow[bar])
					{
						 if  (maFast_1[bar] > maSlow_2[bar])
						{
							 if  (Close[bar] < ma[bar])
							{
								 if  (EarningsDate.InWindow( this , bar, "earnings per share" ,  7 ,  0 ))
								{

									BuyAtMarket(bar +  1 , "Group1|" );
								}
							}
						}
					}

				}
			}
		}
	}
}

Related

Oculus Quest 2 Review

·3 mins
I was debating between PS5 and Quest 2 (Affiliate link), and yes it is like comparing apples and oranges, but in the end Quest 2 won. I will likely buy PS5 at some point though. But before I buy PS5, I need a new TV with 4K and HDR. It seems pointless to play PS5 on 1080p TV from early 2010s. Quest 2 is not my first experience with Virtual Reality. I tried PSVR about 2-3 years ago but the mess of wires really turned me off with the idea of VR. When I found out that Quest 2 is completely wireless, I got interested in it again. I was not very excited about needing Facebook account to use it though.

Docker in 5 minutes

·2 mins
I have been using Docker and Kubernetes for several years now but never really took any time to really read about it. There were a lot of gaps in my understanding of how Docker works and what really is possible with it. Just recently my employer started to offer a Udemy subscription, so I took the Hands on Docker course. Here are some of the important things I learned in this course.