NexusFi: Find Your Edge


Home Menu

 





IntrabarOrderGeneration


Discussion in EasyLanguage Programming

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




 
Search this Thread

IntrabarOrderGeneration

  #1 (permalink)
AhmedF
north bergen
 
Posts: 13 since Feb 2017
Thanks Given: 3
Thanks Received: 1

how do i get [IntrabarOrderGeneration = True] to work on one section of the code and not affect the entries and exits.

What i am trying to accomplish is have money management strategies work one tick later rather than one bar later.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
About a successful futures trader who didnt know anythin …
Psychology and Money Management
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


AhmedF,

the IntrabarOrderGeneration attribute will affect the whole code. You can look into the reserved word BarStatus to execute certain parts of your code at the end of the bar only for example.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
AhmedF
north bergen
 
Posts: 13 since Feb 2017
Thanks Given: 3
Thanks Received: 1

OK, thanks,

An other question can you tell me if something is wrong with the following section of the code for some reason it is not functioning correctly

if (data2var99 crosses over 0) and (data2var10> 0)
then begin
VVSUP = true;
VVSDN = false;
end;
if (data2var99 crosses under 0) and (data2var10> 0)
then begin
VVSUP = false;
VVSDN = true;
end;

if VVSUP then begin
if indicator crosses over 0 then buy next bar at market;
if marketposition = 1 and indicator crosses under 0 then sell next bar at market;
end;

if VVSDN then begin
if indicator crosses under 0 then sellshort next bar at market;
if marketposition =-1 and indicator crosses over 0 then buytocover next bar at market;
end;

else

if (data2var98 crosses over 0) and (data2var10< 0)
then begin
WWSUP = true;
WWSDN = false;
end;
if (data2var98 crosses under 0) and (data2var10< 0)
then begin
VVSUP = false;
VVSDN = true;
end;

if WWSUP then begin
if indicator crosses over 0 then buy next bar at market;
if marketposition = 1 and indicator crosses under 0 then sell next bar at market;
end;

if WWSDN then begin
if indicator crosses under 0 then sellshort next bar at market;
if marketposition =-1 and indicator crosses over 0 then buytocover next bar at market;
end;
end;








ABCTG View Post
AhmedF,

the IntrabarOrderGeneration attribute will affect the whole code. You can look into the reserved word BarStatus to execute certain parts of your code at the end of the bar only for example.

Regards,

ABCTG


Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

AhmedF,

what does the code do and what exactly do you want it to do instead?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #6 (permalink)
AhmedF
north bergen
 
Posts: 13 since Feb 2017
Thanks Given: 3
Thanks Received: 1

it only executes trades on data in both directions and ignores data2

what i want it to do is as long as data2 is up i want to trade up only nothing else at all.
and when its down simply trade down.

and when data2indicator2 <0 i want it to trade in both directions


ABCTG View Post
AhmedF,

what does the code do and what exactly do you want it to do instead?

Regards,

ABCTG


Reply With Quote
  #7 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

AhmedF,

I would suggest to use the "print" reserved word - the helpfile and wiki will show you how to use it -
to print the values of your code when a signal should be generated.
This way you can check what is going on within your code.

I am not sure if I understand you correctly, but in case you try to issue entries on data 2 this wouldn't be possible
as you can only issue trades on data1.

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on February 16, 2017


© 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