Hi All,
Before I start off, just to introduce myself- I've started trading for close to a year now. Initially started off with spread betting and typically like many I experienced a roller coaster ride while trying to experiment various strategies-but managed to keep my losses to as small as possible while I am experimenting (in terms of the bet amounts). I have learnt a lot from the strategies discussed in this BB especially after closely following Grey1's advice .
I am now in a transition stage from spread betting to the actual trading and am trying to use the tradestation for analysis and ease of decision making.
I have found and tried to absorb extensive discussions of Grey1's strategy in relation to the VWAP engine, Exhaustion Engine and the Risk engine but could not find much on the codes for the functions which can be entered in the TS to enable me to properly use the strategies and hence I decided to start this thread with a view to get your help.
On the VWAP- the code which I 've found in the this BB is as follows-
vars:
PriceW(0),
ShareW(0),
Answer(0);
if date > date[1] then begin
PriceW = 0;
ShareW = 0;
end;
PriceW = PriceW + (AvgPrice * (UpTicks+DownTicks));
ShareW = ShareW + (UpTicks+DownTicks);
if ShareW > 0 then
Answer = PriceW / ShareW;
VWAP_H = Answer;
now create an indicator "VWAP"
Quote:
inputs:
UpColor(Red),
DownColor(Blue);
vars:
Answer(0);
Answer = VWAP_H;
if AvgPrice >= Answer then
SetPlotColor(1,DownColor)
else
SetPlotColor(1,UpColor);
Plot1(Answer,"VWAP");
This code passes the verification test on the TS - Could someone pl. comment on this code if this is comprehensive?
Edit- missed this one- the mpd bands can be calculated as (the days high -days low)/2
VWAP +mpd and VWAP -MPD (just remembered these from Grey1's earlier posts).
Reading the materials posted by Grey1 on risk management based on volatility stops I think 2 risk bands can be plotted on the chart to give an indication of the stops -the function can be-
(max share value in the last 14 days incl the current day +min value in this period) /2 ='X'
now the stop bands can be 'X' + 'Y' and 'X' -'Y' where Y is a function of the capital which can be risked on a trade as the case may be for the individual. It would be easier for me to fit the function in an excel but trying to code it for TS........
At this stage I do not have an idea as to how to go about the Exhaustion engine (MACCIs)- any help there please?
Pl. feel free to give constructive comments.
Best wishes.
Raj
Before I start off, just to introduce myself- I've started trading for close to a year now. Initially started off with spread betting and typically like many I experienced a roller coaster ride while trying to experiment various strategies-but managed to keep my losses to as small as possible while I am experimenting (in terms of the bet amounts). I have learnt a lot from the strategies discussed in this BB especially after closely following Grey1's advice .
I am now in a transition stage from spread betting to the actual trading and am trying to use the tradestation for analysis and ease of decision making.
I have found and tried to absorb extensive discussions of Grey1's strategy in relation to the VWAP engine, Exhaustion Engine and the Risk engine but could not find much on the codes for the functions which can be entered in the TS to enable me to properly use the strategies and hence I decided to start this thread with a view to get your help.
On the VWAP- the code which I 've found in the this BB is as follows-
vars:
PriceW(0),
ShareW(0),
Answer(0);
if date > date[1] then begin
PriceW = 0;
ShareW = 0;
end;
PriceW = PriceW + (AvgPrice * (UpTicks+DownTicks));
ShareW = ShareW + (UpTicks+DownTicks);
if ShareW > 0 then
Answer = PriceW / ShareW;
VWAP_H = Answer;
now create an indicator "VWAP"
Quote:
inputs:
UpColor(Red),
DownColor(Blue);
vars:
Answer(0);
Answer = VWAP_H;
if AvgPrice >= Answer then
SetPlotColor(1,DownColor)
else
SetPlotColor(1,UpColor);
Plot1(Answer,"VWAP");
This code passes the verification test on the TS - Could someone pl. comment on this code if this is comprehensive?
Edit- missed this one- the mpd bands can be calculated as (the days high -days low)/2
VWAP +mpd and VWAP -MPD (just remembered these from Grey1's earlier posts).
Reading the materials posted by Grey1 on risk management based on volatility stops I think 2 risk bands can be plotted on the chart to give an indication of the stops -the function can be-
(max share value in the last 14 days incl the current day +min value in this period) /2 ='X'
now the stop bands can be 'X' + 'Y' and 'X' -'Y' where Y is a function of the capital which can be risked on a trade as the case may be for the individual. It would be easier for me to fit the function in an excel but trying to code it for TS........
At this stage I do not have an idea as to how to go about the Exhaustion engine (MACCIs)- any help there please?
Pl. feel free to give constructive comments.
Best wishes.
Raj
Last edited: