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 ) ;
|