Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
HI all,
I get very confused with the signal when the marketing position is not 1 or -1..i.e. with flat position, don't understand why the line after else goes like
, the position is flat, what is it for SELL? Likewise in the ATR Trialing SX coding what is it for BuytoCover?
I am trying to use this signal to exit in my HSI trading algo, and it always cause the buy and sell to happen within the same bar.
Hope someone experienced with this signal can give me some guidance.
if var1 = 1 then
begin
condition1 = var1[1] <> 1 or High > var2 ;
if condition1 then
var2 = High ;
Sell ( "AtrLX" ) next bar at var2 - var0 stop ;
end
else
Sell ( "AtrLX-eb" ) next bar at High - var0 stop ;
Can you help answer these questions from other members on NexusFi?
I am aware of what Sell and BuytoCover do. Just that if I look at the first "If" statement, if Position != 1, then it still triggers a sell...that's the bit I don't understand.
And if you look at ATR Trailing SX signal, if Position != -1 (hence either in flat or positive position) then it will still trigger a buytocover :
Anyone who can give me some guidance will be highly apprecaited.
I am not sure I follow you correctly. The code example you posted below has the first if statement starting with: "if var1 = -1 then" i.e. it is only executed when you are in a short position and it triggers "Buy To Cover" orders i.e. the closing orders for the short position.
The second Buy To Cover simply serves as an entry bar protection as without intrabar order generation the change in the market position would only be detected until the end of the bar. This way you are not left without a stop during your entry bar and the platform won't issue the order when you are flat or long.
HI ABCTG - thanks for your comment...the intrabar order generation insight is something new to me...
But thats very useful indeed.
Thank you again.
ABCTG
my2108,
I am not sure I follow you correctly. The code example you posted below has the first if statement starting with: "if var1 = -1 then" i.e. it is only executed when you are in a short position and it triggers "Buy To Cover" orders i.e. the closing orders for the short position.
The second Buy To Cover simply serves as an entry bar protection as without intrabar order generation the change in the market position would only be detected until the end of the bar. This way you are not left without a stop during your entry bar and the platform won't issue the order when you are flat or long.