Hi there,
Does QS have what TradeStation name as ATR stop.
For e.g. - ATR Big Profit Stop (there's also other and combine together seem like a lethal ways for exit)
The average true range is calculated and multiplied by BigProfitATRs (Input) in order to determine the %u201CBig
Profit%u201D level. On the first bar of a position, the reserved word BarsSinceEntry will return zero. When this occurs,
the variable PosHL is set to the Close of the current bar. ---
ATRVal = AvgTrueRange(ATRLength) * BigProfitATRs;
If BarsSinceEntry = 0 Then
PosHL = Close;
As long as the market is in a Long position, there is a constant testing of PosHL compared to the current Close.
If the current Close is greater than PosHL, then PosHL is reset to the value of the new Close, maintaining the
highest Close value of the position in PosHL. The Long exit order is generated once the position has reached
ATRVal points above EntryPrice. If the price activity has reached this level, a Long exit order at the lowest Low
of the last ExitBarLen (Input) bars. ---
If MarketPosition = 1 Then Begin
If Close > PosHL Then
PosHL = Close;
If PosHL > EntryPrice + ATRVal Then
ExitLong Next Bar at Lowest(Low, ExitBarLen) Stop;
End;
Also, how to code
Buy Next Bar at High + 1 point ;
I can use the wizard to do it but was just wondering how to actually code it..
I did something like Buyprice(ref (high, -1)+1),10);
And since I'm asking, I saw the Simulation 1 trading system have both the AND and && syntax in one statement.
A bit confuse which one to use... +_+!!!
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.