Simple Long Strategy Tempplate Help - futures io
futures io futures trading



Simple Long Strategy Tempplate Help


Discussion in EasyLanguage Programming

Updated by TraderDoc2
    1. trending_up 193 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 1 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Thread Tools Search this Thread
 

Simple Long Strategy Tempplate Help

  #1 (permalink)
PDX, Oregon
 
Experience: Intermediate
Platform: NinjaTrader, Tradestation
Broker: Tradestation
 
Posts: 13 since Jan 2010
Thanks: 3 given, 4 received

Simple Long Strategy Tempplate Help

Hi Everyone, I'm trying to create a simple long strategy template to buy on a new green bar with stop below the most recent low of current bar or previous bar whichever is lower. Profit target of .30 and .70 to or stop below the the most recent low near entry bar. After profit target 1, move stop to break even. If ncessary, a hardstop of 1.0 to close out position.

I have a mixture of EL and pseudo code below. Can anyone help fill in the EL to the strategy?

A big thank you to anyone who can help.

Inputs:

EntrNShares(100),
ExitNSharesFirst(50),
ExitNSharesSecond(50),
Profit1(.30),
Profit2(.70),
HardStops(1.0);

Variables:
mystop (0);


"If current bar is green and the current bar low is < previous bar low then begin
mystop = low of current bar
else
mystop = low of previous bar
end;


If marketposition <> 1 and "current bar close is greater then open" then begin
Buy ("LONG") EntrNShares shares next bar open market;
"Mystop = Entryprice"
End;

If marketposition = 1 then begin
Sell ("Sell Target 1") ExitNSharesFirst shares next bar entryprice + profit1 limit;
Sell ("Sell Target 2") ExitNSharesSecond shares next bar entryprice + profit2 market;
end;

If marketposition = 1 and "price crosses under mystop or hardstop' then begin
"close position" market
end;

Reply With Quote

Can you help answer these questions
from other members on futures io?
Convert NinjaTrader NT7 indicator to Tradestation EasyLanguage and RADARSCREEN
Platforms and Indicators
Issue meeting order entry conditions
Elite Automated NinjaTrader Trading
Last 5 minutes Label
ThinkOrSwim
Moving average with Lag reduction
NinjaTrader
Linux?
ThinkOrSwim
 
 
  #2 (permalink)
Plainview
 
Experience: Intermediate
Platform: TradeStation
Broker: TradeStation
Trading: Futures
 
Posts: 10 since Mar 2012
Thanks: 0 given, 13 received


cnbcsucks View Post
a new green bar with stop below the most recent low of current bar or previous bar whichever is lower. Profit target of .30 and .70 to or stop below the

"If current bar is green and the current bar low is < previous bar low then begin
mystop = low of current bar
else
mystop = low of previous bar
end;

To begin, I need to know how you define a new green bar - is it a bar with a close greater than the open? is it a bar whose close is greater than the close of one bar ago?
Is it something else?

Also , I believe mystop should be equal to the lowest(Low,2)

so

"If current bar is green and the current bar low is < previous bar low then begin
mystop = Lowest(Low,2);
end;

sorry, but don't have time yet to work on this further. Please define green bar better.

Follow me on Twitter Reply With Quote



futures io Trading Community Platforms and Indicators EasyLanguage Programming > Simple Long Strategy Tempplate Help




Upcoming Webinars and Events
 

Understanding Order Flow Stop Runs & Icebergs w/Bookmap

May 28
 

Free BloodHound Licenses to everyone!

June
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts