NexusFi: Find Your Edge


Home Menu

 





How to implement this?


Discussion in MultiCharts

Updated
    1. trending_up 1,324 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

How to implement this?

  #1 (permalink)
r41866
Cypress Texas/USA
 
Posts: 10 since Mar 2021
Thanks Given: 0
Thanks Received: 1

I want to do the following to submit my orders quickly.

1. Check the current bar to see whether it is a bullish bar.

2. If it is, get the high and low of the bar. Use High - Low + 2 ticks as the risk, to see whether the bar is too large for the maximum risk I can tolerate.

3. If the risk is ok, place a stop market order 1 tick above the High the moment the next bar is opened.

4. If the risk is too large, after the current bar is closed, wait for the break of the High of the current bar. Once the High is broken, place a limit order according to the maximum risk.

I am pretty new to Multicharts programming. Please let me know the frame work of this flow. I currently have no idea because this seems to require 2 or 3 entry strategies and I don't know what to do if that's the case.

Thanks.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
NexusFi Journal Challenge - May 2024
Feedback and Announcements
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
45 thanks
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Bigger Wins or Fewer Losses?
24 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #2 (permalink)
 kjhosken 
Seattle, WA/USA
 
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
Posts: 96 since Sep 2016
Thanks Given: 7
Thanks Received: 35


r41866 View Post
I want to do the following to submit my orders quickly.

1. Check the current bar to see whether it is a bullish bar.

2. If it is, get the high and low of the bar. Use High - Low + 2 ticks as the risk, to see whether the bar is too large for the maximum risk I can tolerate.

3. If the risk is ok, place a stop market order 1 tick above the High the moment the next bar is opened.

4. If the risk is too large, after the current bar is closed, wait for the break of the High of the current bar. Once the High is broken, place a limit order according to the maximum risk.

I am pretty new to Multicharts programming. Please let me know the frame work of this flow. I currently have no idea because this seems to require 2 or 3 entry strategies and I don't know what to do if that's the case.

Thanks.


I'm at work, so can't verify that this works, but this might get you started in the right direction
 
Code
inputs:
myrisk$(100);
vars: risk2points(0), bulls(false), bears(false), risk(0);

risk2points = myrisk$ / bigpointvalue;

if open > close then begin
    risk = (high-low+2 * minmove) * bigpointvalue;
       if risk < myrisk$ then buy next bar at high + 1 point stop;
       if risk > myrisk$ then buy next bar at low + risk2points;
end;

Follow me on Twitter Reply With Quote
  #3 (permalink)
r41866
Cypress Texas/USA
 
Posts: 10 since Mar 2021
Thanks Given: 0
Thanks Received: 1


Thank you for the response. However, it won't work according to my plan. If the risk is larger then the risk tolerance, I want the strategy to wait for the break of the current bar and then place a limit order. However, your code places the limit order even if the high of the current bar is not broken.


kjhosken View Post
I'm at work, so can't verify that this works, but this might get you started in the right direction
 
Code
inputs:
myrisk$(100);
vars: risk2points(0), bulls(false), bears(false), risk(0);

risk2points = myrisk$ / bigpointvalue;

if open > close then begin
    risk = (high-low+2 * minmove) * bigpointvalue;
       if risk < myrisk$ then buy next bar at high + 1 point stop;
       if risk > myrisk$ then buy next bar at low + risk2points;
end;


Reply With Quote




Last Updated on March 8, 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