NexusFi: Find Your Edge


Home Menu

 





Strategy Not Plotting


Discussion in EasyLanguage Programming

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




 
Search this Thread

Strategy Not Plotting

  #1 (permalink)
 
simon14's Avatar
 simon14 
TORONTO
 
Experience: Advanced
Platform: multi charts
Trading: crude cl
Posts: 19 since Sep 2016
Thanks Given: 10
Thanks Received: 6

Hi everyone having some issues with my first strategy iam trying to write with easy language. I have managed indicators before but this seems to be giving me plenty of issues.
The Strat is too buy or sell when the ichimuko lines crossover or under eachother.
here is my code. ( It doesn't even show up on Multi Charts but it does compile successfully)

Any tips will help me get through this fuss. Thank you Kindly.

inputs:
Price( Close ),
Standard(26),
Turning(9),
Capital( 10000 ),
PositionBasis( false ),
AmountSTOP( 250 ),
AmountPROF( 1000 );


variables:
Turnline( 0 ),
StdLine( 0 ),
Equity( 0 ),
ShareAmount( 0 );

StdLine = (Highest(High, Standard) + Lowest(Low, Standard)) / 2;
TurnLine = (Highest(High, Turning) + Lowest(Low, Turning)) / 2;

if CurrentBar > 1 and turnline crosses over stdline then
buy ( "Buy" ) ShareAmount shares next bar at market;

if CurrentBar > 1 and turnline crosses under stdline then
sell ( "Sell" ) ShareAmount shares next bar at market;


if PositionBasis then
SetStopPosition
else
SetStopShare ;

SetProfitTarget( AmountPROF ) ;


if PositionBasis then
SetStopPosition
else
SetStopShare ;

SetStopLoss( amountSTOP ) ;

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
What broker to use for trading palladium futures
Commodities
MC PL editor upgrade
MultiCharts
 
  #3 (permalink)
 
simon14's Avatar
 simon14 
TORONTO
 
Experience: Advanced
Platform: multi charts
Trading: crude cl
Posts: 19 since Sep 2016
Thanks Given: 10
Thanks Received: 6


inputs:
Standard(52),
Turning(18),
Stop_Loss(500),
Take_Profit(500);

Variables:
StdLine(0),
TurnLine(0);

StdLine = (Highest(High, Standard) + Lowest(Low, Standard)) / 2;
TurnLine = (Highest(High, Turning) + Lowest(Low, Turning)) / 2;

condition1 = Turnline crosses_below StdLine;
condition2 = Turnline crosses_above StdLine;


if condition1 then begin
Sell("SE") next bar at open;
end else if condition2 then begin
buytocover("Cover") next bar at open;
end;


Feel like this is much better now except iam having issues writing the conditions.

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

simon14,

for your first post, you sent orders with a size of 0 (ShareAmount = 0), those won't show up.

For your second post, what are the issues you are having with writing the conditions?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
 
simon14's Avatar
 simon14 
TORONTO
 
Experience: Advanced
Platform: multi charts
Trading: crude cl
Posts: 19 since Sep 2016
Thanks Given: 10
Thanks Received: 6

lmao wow.. thank you ABCTG solved ! thanks bud !

Started this thread Reply With Quote




Last Updated on September 29, 2016


© 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