In today’s blog I want to introduce one of the most important concepts in the script. The code goes like this.**//approximate 4 hour BB breakoutif (High[0]>= BLG_U[0](Close, 80, 2)) thenbuysellzone=-1lastBreakPrice=high[1]endifif (Low[0]<= BLG_L[0](Close, 80, 2)) thenbuysellzone=1lastBreakPrice=low[1]endifI feel it’s one of the most significant parts because it calls on those global variables we assigned earlier and allows you to hold a specific condition until another definable condition is meat regardless of what happed between. With most scripts, the whole statement is either true or false, but with these the condition can be false but as long as the second condition isn’t meet then you can keep a value assigned to the global variable. Here’s an example of what I am talking about. **Let’s say you wanted to buy if RSI, Slow K became oversold in the last 24 hours and the PSAR supports a long. In regular statements unless all three conditions were meet at exactly the same time the statement not evaluate as true. But using these tyope of stamen the value can be held true even if the three conditions happened independently of eachother , but were true sometime in the last 24 hours.Using this example, the following script produced absolutely no trades.**if RSI[0](Close, 14) <>
However, by creating a buy/sell zones you can handle this instance and find trades based on the criteria involved. **global rsif LLV(RSI[0](Close, 14), 24) < thenrs =" 1elsers" rs =" 1" id="BLOGGER_PHOTO_ID_5364781958690959346" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 266px; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlgWIai6PNQa3eDrHuMieBp-e4yMHeDn0WjpCSkc_pXKpvYxbBc2Qt6FDgN2GUi8GEmFRqCPJXDQsIjWbCjRdfTo1UidVv3hAdSTu6Toyp6OF55LafobHs5H_jwsP15lVzmwpQ6JOnDUQ/s400/c2222.jpg" border="0">
In the Larger script, we wanted a buy/ sell zones if the 80 Bollinger Band was broken, meaning we were in overbought or oversold conditions, and then we wanted to move on to further considerations. Let’s see who can send me the sell side of this script first. If you are the first one and it executes in the reverse of the buy, then I ‘ll send you a set of scripts that use in my trading
0 التعليقات:
أنشر تعليقك