Basic rules Gann swing trading. To buy there must be a Gann uptrend, so the price should be higher than the last high. The HiLo activator will sit as a stop loss below the bar. If the price of has been in a rising trend ,but the closing price was below the HiLo activator (eg in a correective phase), then we buy when a closing price above the HiLo activator is put down. The rules to sell are the opposite. Selling we do when the Gann swing trading method turns from rising to declining (gann Down Trend, there has been a lower low) or if the Gann swing is already falling , by breaking the HiLo activator. Stops and profit protection. For a long position we take profit of all contracts if the price closes below the HiLo activator. The 38% retracement rule: take profit on all contracts with a 38% correction (Fibbonacci percentage) of the current swing, in this case we dont wait for the closing price. Suppose we are talking about an upswing , an uptrend from A to B. For example if the current price than retraces 38% of the distance AB and also below the HiLo activator, we must exit the market and not wait for the closing.
ChrisMoody
⋅
VERY IMPORTANT!!!
I coded this without knowing Rules. The Plots are on the Correct Bars...HOWEVER...the plots are placed Precisely at the Low or High of the Bar...I did this so they wouldn't get covered up...THEREFORE..The Plots DO NOT represent the correct VALUES Per Se.
Immediate Solution!!!
On the Inputs Tab Choose Circles so the Circles Plot. These will show up at correct values per the code. You can then change the Circles to Lines if you prefer in the Styles Tab.
Routcheau
⋅
Hi! 10Q! Why 2nd LHLL bar is green?
ChrisMoody
⋅
@Routcheau, If you don't mind...be more specific...are you talking about the chart above or on a different chart? Just give me the exact date your referring to either on the chart above...or the date and Symbol and TimeFrame if your talking about a different chart.
There's an EMA.
(Why not SMA by the way? Not the most important question!!!)
Can I manipulate through that EMA :
One bar breakout to change the color (EMA2 ?)
Two bars breakout to change the color (EMA3 ?)—*
Three bars breakout to change the color (EMA4 ?)
*— In the script I see "3 periods"
Do they change the color for 2_breakout_bars_swing ?
I guess ema's minimum period 2 means "one bar Hi/Lo breakout" etc.
pipCharlie
⋅
All you work is greatly appreciated! I'm new to PINE, trying to learn it by reading others codes and have a question. Using this code as an example, how would I execute plot or plotshape so it only draws the cirle/ triangle once while it is in the same direction. In other words, it only plots when it flips? Thanks in advance for any assistance you can offer.
ChrisMoody
⋅
You would create a True False condition...which I did...but you would want the True/False condition to be True only once like a Cross...I have a code somewhere where TheLark labeled something as a Cross that really wasn't technically a cross. I'll look it up when I get a chance...If I haven't answered you by Tuesday morning PM me and remind me or ask me to answer below.