Welcome to NexusFi: the best trading community on the planet, with over 200,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 -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
condition1 = var2 crosses over 0;
condition2 = var2 crosses under 0;
if OpenPosPL{marketposition} = 0 then begin
if condition1 then begin
Buy ("bullish") 1 contract this bar on Close;
//Alert( "Bullish alert" )
//Sell ("Exit l3-c1 Target") 1 Contracts Next Bar At (entryprice + PT) Limit;
//Sell ("Exit l3-c1 Stop") 1 Contracts Next Bar At SL Stop;
SetStopContract;
SetStopLoss (300);
SetProfitTarget (10);
end;
if condition2 then begin
SellShort ("bearish") 1 contract this bar on Close;
//Alert( "Bearish alert" ) ;
//BuyToCover ("Exit l3-c1 Target") 1 Contracts Next Bar At (entryprice - PT) Limit;
//BuyToCover ("Exit l3-c1 Stop") 1 Contracts Next Bar At SL Stop;
SetStopContract;
SetStopLoss (300);
SetProfitTarget (10);
end;
*************************************
Here I have esablished the for SL $300 and PT $10. I want a way to check and see if I am flat. "if marketposition = 0 then begin" does not seem to work with "SetStopLoss" and "SetProfitTarget". It recognizes the initial conditions are met places a buy or sell order then the program gets lost. I have tried a variable using "GetPositionOpenPL" instead of "marketposition" in hope to achieve the same info as to whether or not I am flat. It works but the SL and PT an re not consistent and are not placed with every entry......Please help!
Can you help answer these questions from other members on NexusFi?