NexusFi: Find Your Edge


Home Menu

 





Buy/Sell when price crosses high/low for the day


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one jessehhhh with 6 posts (0 thanks)
    2. looks_two loantelligence with 4 posts (0 thanks)
    3. looks_3 demccarthy with 1 posts (0 thanks)
    4. looks_4 Bietto with 1 posts (0 thanks)
    1. trending_up 4,982 views
    2. thumb_up 0 thanks given
    3. group 6 followers
    1. forum 14 posts
    2. attach_file 2 attachments




 
Search this Thread

Buy/Sell when price crosses high/low for the day

  #11 (permalink)
 loantelligence 
Syracuse, NY
 
Experience: Intermediate
Platform: Ninja Trader
Broker: Mirus Futures/Zen-Fire
Trading: NQ
Posts: 218 since Jan 2011
Thanks Given: 31
Thanks Received: 189

not a problem....if I was at my machine I could actually send it to you...on vacation…will be home next week.....tradestation doesn't have a parameter driven programming language???

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
What broker to use for trading palladium futures
Commodities
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
26 thanks
ApexTraderFunding.com experience and review
13 thanks
Trading with Intuition
12 thanks
GFIs1 1 DAX trade per day journal
9 thanks
Funded Trader platforms
7 thanks
  #12 (permalink)
jessehhhh
Montclair
 
Posts: 17 since Nov 2018
Thanks Given: 0
Thanks Received: 0

it probably does but i'm still not sure how to use all the functionality and i'm still trying to understand the logic behind coding thats why seeing examples really helps me.

I'm a trader turned coder not a coder with an idea!

If I cant figure it out maybe i'll reach back out to you on here next week?

thanks a million

Reply With Quote
  #13 (permalink)
Bietto
Milan Italy
 
Posts: 4 since Mar 2020
Thanks Given: 1
Thanks Received: 0


Hi all,

I join this thread as I have a similar issue.

Could someone write for me the code to do the following?

Given an "identified" bar, I want to buy at this bar HIGH and sell short at this bar LOW and (VERY IMPORTANT) want to keep the order valid not only for next bar but also for all subsequent bars till a new "identified" bar takes place.
Market Position is always = 1.
Intrabar order generation is true as I want to enter the trade as soon as the price reaches one of the thresholds. Please see the attached picture for your better understanding.

Appreciate anyone who can help!

Thanks

Attached Thumbnails
Click image for larger version

Name:	Example Trigger Bar.PNG
Views:	198
Size:	16.1 KB
ID:	294005  
Reply With Quote
  #14 (permalink)
NorthStarTrading
Boston, Massachusetts
 
Posts: 1 since Feb 2021
Thanks Given: 0
Thanks Received: 0


Bietto View Post
Hi all,

I join this thread as I have a similar issue.

Could someone write for me the code to do the following?

Given an "identified" bar, I want to buy at this bar HIGH and sell short at this bar LOW and (VERY IMPORTANT) want to keep the order valid not only for next bar but also for all subsequent bars till a new "identified" bar takes place.
Market Position is always = 1.
Intrabar order generation is true as I want to enter the trade as soon as the price reaches one of the thresholds. Please see the attached picture for your better understanding.

Appreciate anyone who can help!

Thanks

I am looking for exactly this as well. I want to enter the trade when the level of a previously identified bar break. NOT on close of the bar that breaks it. I have intrabar order generation and look inside tick as well. It still wait until bar close, which is not good.

Attached Thumbnails
Click image for larger version

Name:	image_798.png
Views:	173
Size:	43.6 KB
ID:	310037  
Reply With Quote
  #15 (permalink)
demccarthy
Stamford
 
Posts: 1 since May 2018
Thanks Given: 0
Thanks Received: 0

I'm trying to write a strategy that looks at the first hour of trading and then buys or sells short based on the price after that hour. if the price moves under the low of the hour I want to sellshort, and vice versa for the high. intrabar order generation is true as I want to enter the trade as soon as the price crosses one of the thresholds.

My code looks something like

Value1 = lowd(0)
Value2 = highd(0)


If time>1030 and close>value2 then buy next bar at market

else

if time <1030 and close<value1 then sellshort next bar at market
End;

For some reason this isn't working as looking back over years of data generates 0 trades.

Appreciate anyone who can help!

Thanks
==========================

If you move the value1 and 2 lines below the other code then it will work by using the values from the previous go round.

If Value1 <> 0 and Value2 <>0 then begin

If time>1030 and close>Value2 then buy next bar at market
else
if time <1030 and close<Value1 then sellshort next bar at market
End;

end;

Value1 = lowd(0);
Value2 = highd(0);

Reply With Quote




Last Updated on May 24, 2021


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts