Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.
nab999
Members-
Content Count
36 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Articles
Everything posted by nab999
-
Hi all, I have coded the following to get a system to buy a low bolinger band and sell a high bollinger band, but it will not take any trades. If I change the code to say If close¨of 1 bar ago is less than the lower band and the close is now above the lower band, then buy at market, and visa versa for shorts, then it does take the trades, but I want it to enter as it hits the lower band from below and the upper band from above, not wait till a close. Here is my code..... inputs: Length( 20 ), NumDevsUp( 2 ), NumDevsDn( 2 ); variables: Avg( 0 ), SDev( 0 ), LowerBand( 0 ), UpperBand( 0 ),BollingerPrice(0),TradeLine(0); BollingerPrice=Close of data1 / close of data2; TradeLine= Close of data1 / close of data2; Avg = AverageFC( BollingerPrice, Length ) ; SDev = StandardDev( BollingerPrice, Length, 1 ) ; UpperBand = Avg + NumDevsUp * SDev ; LowerBand = Avg - NumDevsDn * SDev ; if Tradeline< Lowerband then Buy next bar at Lowerband stop; if Tradeline> Upperband then Sellshort next bar upperband stop; if Marketposition>=1 and tradeline<Upperband then sell next bar at upperband stop; if Marketposition<=-1 and tradeline>Lowerband then buytocover next bar at Lowerband stop; Many thanks.
-
Hi All, Does anyone know if it is possible to get an indicator to plot like a H L C bar chart. I.e. Using the standard Spread Diff indicator in TS 8.6 on a 1 min chart. The indicator will move to the high and low of the spread during the bar formation, but will only plot the close. Would it be possible to have it also plot the highest price that the spread went to and the lowest price that the spread went to during the formation of this 1 min bar. Many thanks.
-
Hi, Please find attached a screenshot. I have looked to code this myself, but I can not find any functions Etc in Tradestation that will allow me to plot a horizontal line, starting at x time, from the price of an indicator ( standard Spread Diff indicator in tradestation ) at that time, until Y time. Many thanks
-
Hi, Does anyone know how to code the following....... I am plotting the Spread Diff Indicator on a 1 min chart. What I would like is and additional plot to the above indicator At X time, take the current price of the indicator and plot a horizontal line from this price and stop plotting at Y time, then do the same the following day, Etc Etc, keeping all previous lines for the previous days where they were drawn. I am using TS 8.6. Many thanks.
-
Hi Hal, Thank you for the reply. You are correct, the red and green lines have no axis and so are just set in subgraph 3. What I am looking for is an easier way to view this action. i.e. if the red and green lines are the same point, then a 0.00 line would be plotted at the centre of subgraph 4. From this point onwards, the histogram would plot the difference, i.e. point by point move of each of the lines, until they touch again, when the histo would be reset back to 0 and start plotting again. So as such, it would be like a histo of a spread difference, which will reset to 0.00 each time the lines touch.
-
Hi, they are both 1 period exponential moving averages to simulate the close of data1 and data2. They are then plotted in subgraph 3 with NO AXIS. The reason for this is that I can not just use averages of data1 and data2, because they have prices set to their axis. I tried setting data1 and data2 to no axis and then plot a histogram of them both, but the histogram does not cross over when the lines cross over. Many thanks.
-
Thank you very much for taking the time to code this, both of the problems are solved. Great work.
-
Hi, OK, sorry for that. I am using TS 8.6, symbol @ES 5 min timeframe. The 2 problems are that I can not get the code to place a value at the high and a value at the low of the range that will be calculated at calctime and then have these values set at these levels until the next time to recalculate them comes around. Also, I tried to use the dailywinners and dailylosers both set to 0, to attempt to say that I only want to take one trade per day, but having these does not seem to limit the number of trades to just one per day. Many thanks.
-
Hi Guys, Could someone help me with this EL code please.. What I am trying to do is at a certain time, place values at the highest high and at the lowest low of the last x number of bars, which will remain constant. Then I am looking to sell on a break below / Buy on a break above this range, Only one trade per day ( hence the daily winners/daily losers, but this also does not seem to work) Many thanks for your help. Input: TimeCalc (1000), Length(9), PTS(0.03); Var: DailyLosers(0), DailyWinners(0); If Time = Timecalc then begin Value1 = NthHighest(high,length,1); Value2=NthLowest(Low,Length,1); End; If Time > Timecalc and dailylosers=0 and dailywinners=0 then begin Buy next bar at value1 + PTS points stop; sellshort next bar at value2 - PTS points stop; End;
-
Hi, I tried this and similar but it does not work, this is because the first average is a moving average of data1 the second is a moving average of data2, but.... they are both plotted in subgraph 3 WITH NO AXIS and this is where I have the problem.
-
Hi Giys, As you can see from the attached screenshot and TS 8.6 workspace, I have a 1 period xma of data 1 with no axis (green) and the same for data2 (red) What I am looking for is a histogram indicator that will show a histogram in Red, above a zero line if the green average is above the red average, will show Green if the red average is above the green average and below the zero line, will also plot the difference between the 2 averages and will show a zero line where both averages are the same. I have tried many times but it never works, no doubt due to my very limited EA abilities. If someone could code this up for me I would be very grateful. Regards, Neil. A Neil Ind Req.zip